Roky

Statistika

Pridružen/a:
09 apr 2008, 11:48
Zadnjič aktiven:
Prispevki:
2509 | Vsi prispevki
Teme:
124 | Vse teme
3240
335
107

Podpis

rok.meglic@gmail.com - 031 492 148
#21

Pri meni so rabil 3 tedne, tako da počasi:)


všeč(0) ni všeč(0) spam(0)
#12

@perunpro, v tem primeru potem raje tako da se kliče editContent, ki ta ID pobriše (delete) in nato add. Tako je simple.


všeč(0) ni všeč(0) spam(0)
#90

@Balonar. Ker nisi prišel čez prvo fazo:) Ko prideš čez prvo fazo imaš šele to ugodnost, da te snemajo hihihi


všeč(2) ni všeč(0) spam(0)
#10

@bl4ckb1rd: Še tole, v ozadju moraš indekser nafilat in sicer:


// indexer se zna obesit zato k ma premal rama, dajmo mu ga več
set_time_limit(100);
ini_set('memory_limit','64M');

require_once 'Zend/Search/Lucene.php';

//RM: CaseInsensitive is used, check http://framework.zend.com/manual/en/zend.search.lucene.charset.html for more info
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive());
self::$works = Application::indexWorks();

$indexDir = Application::getIndexPath();
try {
$index = Zend_Search_Lucene::open($indexDir);
} catch (Zend_Search_Lucene_Exception $e) {
$index = Zend_Search_Lucene::create($indexDir);
}

$doc = new Zend_Search_Lucene_Document();

$encoding = 'utf-8';
$id = 'content'.$id;

$doc->addField(Zend_Search_Lucene_Field::UnIndexed(self::F_CREATED, time()));

$doc->addField(Zend_Search_Lucene_Field::Keyword(self::F_AREA, $area, $encoding));
$doc->addField(Zend_Search_Lucene_Field::Keyword(self::F_ID, $area . $id, $encoding));
$doc->addField(Zend_Search_Lucene_Field::Keyword(self::F_LANG, $lang, $encoding));

$doc->addField(Zend_Search_Lucene_Field::Text(self::F_TITLE, $title, $encoding));
$doc->addField(Zend_Search_Lucene_Field::Text(self::F_URL, $url, $encoding));
$doc->addField(Zend_Search_Lucene_Field::Text(self::F_DESCRIPTION, $description, $encoding));

$doc->addField(Zend_Search_Lucene_Field::UnStored(self::F_CONTENT, $content, $encoding));

$doc->addField(Zend_Search_Lucene_Field::Text(self::F_PORTAL, $portal, $encoding));

$index->addDocument($doc);

P.S: Priporočam ti, da vsakič, ko gradiš nov index vedno pobriši celoten index in na novo dodaj. Meni se zdi, da veliko hitreje dela + več zadetkov meče, kot če editaš zadeve.


všeč(1) ni všeč(0) spam(0)
#8

@bl4ckb1rd, menjava framework-a ni potrebna. V codeignator dodaš helper, class, model ... karkol, kjer rečeš:


// indexer se zna obesit zato k ma premal rama, dajmo mu ga več
set_time_limit(60);
ini_set('memory_limit','64M');

require_once 'Zend/Search/Lucene.php';

$indexDir = 'pot/do/indexa';
try {
$index = Zend_Search_Lucene::open($indexDir);
$this->setIndex($index);
} catch (Exception $e) {
$this->setIndex();
}

Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive());

//RM: Just to be 100% sure that UTF-8 encoding is used
Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('UTF-8');
$query = Zend_Search_Lucene_Search_QueryParser::parse($q, 'UTF-8');
$hits = $this->getIndex()->find($query, 'area', SORT_STRING, 'score', SORT_NUMERIC, SORT_DESC);

foreach($hits as $hit) {
if (!$this->filterHit($hit)) continue;
$i++;
;

$rHits[] = array(
'area'=>$hit->area,
'title'=>$hit->title,
'url'=>$hit->url,
'full_url'=>$this->getFullUrl($hit),
'description'=> $hit->description,
'score'=>sprintf("%01.1f",$hit->score*100)
);
}
všeč(5) ni všeč(0) spam(0)
#5

Za začetek je hitrejš "narejen" tudi Zend Lucene, ne super ampak fajn zadevca.


všeč(0) ni všeč(0) spam(0)
#7

Strinjam z OvcaX, itak gre vse skupaj čez FB javascript parser, če delaš html + nek cache.


všeč(0) ni všeč(0) spam(0)
#5

  • Da Perviz ni upošteval, da PayPal pobere še fee provizijo ... ki jo najbrž plača tisti, ki mu pošlje denar na paypal. Hvala lepa:)


všeč(1) ni všeč(0) spam(0)
#81

Včeraj pa mene. Imaš dve študentke, ena ti nabija ... potem pa te pokliče druga, kjer se klic snema. Ona reče boste dobil domov samo pač informativno račun in če ti rečeš Ja, te pomoje haklajo (... zato snemajo), ker si kao reku DA za račun. No razmišljam ... vglavnem nateg.


všeč(4) ni všeč(0) spam(0)
#3

Pojdi v skype in v nastavitah označi, da naj ne uporablja port 80 ampak alternative.


všeč(1) ni všeč(0) spam(0)