zend-search-lucene

Does Zend Lucene need Java Lucene?

纵然是瞬间 提交于 2019-12-06 06:12:11
问题 When implementing Zend Lucene, do we need to install Java on our server or not? 回答1: Although I have not used it, it appears that you do not need Java to use the Zend_Search_Lucene component. According to the documentation, Zend_Search_Lucene is a fully PHP implementation of Lucene. However, there is support for interoperability between the Java indexes and the PHP indexes. 回答2: Zend implementation is the port of java to PHP of Lucene. This is a great approach of Zend. But the PHP version

Creating and updating Zend_Search_Lucene indexes

放肆的年华 提交于 2019-12-05 05:11:26
I'm using Zend_Search_Lucene to create an index of articles to allow them to be searched on my website. Whenever a administrator updates/creates/deletes an article in the admin area, the index is rebuilt: $config = Zend_Registry::get("config"); $cache = $config->lucene->cache; $path = $cache . "/articles"; try { $index = Zend_Search_Lucene::open($path); } catch (Zend_Search_Lucene_Exception $e) { $index = Zend_Search_Lucene::create($path); } $model = new Default_Model_Articles(); $select = $model->select(); $articles = $model->fetchAll($select); foreach ($articles as $article) { $doc = new

Zend Lucene - How to do query

半腔热情 提交于 2019-12-04 19:44:16
My create index function is as bellow function create() { Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive ()); $index = Zend_Search_Lucene::create('data/index'); $doc = new Zend_Search_Lucene_Document(); $doc->addField(Zend_Search_Lucene_Field::Text('title', 'a cheap car in town milage under 3000','utf-8')); $doc->addField(Zend_Search_Lucene_Field::Text('detail','a cheap car in town milage under 3000','utf-8')); $doc->addField(Zend_Search_Lucene_Field::Text('category', 'milage under 3000','utf-8')); $index->addDocument($doc)

CakePHP with Lucene

。_饼干妹妹 提交于 2019-12-04 17:01:45
I am trying to implement Lucene with cakephp and following this guide http://jamienay.com/2010/01/zend_search_lucene-datasource-for-cakephp/ Am getting this error ConnectionManager::loadDataSource - Unable to import DataSource class .ZendSearchLuceneSource i have placed the Vendor files in app/vendors/Zend/ Added this in the bootstrap.php ini_set('include_path', ini_get('include_path') . ':' . CAKE_CORE_INCLUDE_PATH . DS . '/vendors'); /** * AutoLoading Zend Vendor Files */ function __autoload($path) { if(substr($path, 0, 5) == 'Zend_') { include str_replace('_', '/', $path) . '.php'; } return

Zend_Search_Lucene vs SOLR

主宰稳场 提交于 2019-12-03 11:58:46
问题 I have recenlty stumbled into Zend Lucene port of Lucene project. I have a little bit experience with SOLR so I would like to know what is the difference between two of them especially from performance and installation side. As much as I know SOLR requires Tomcat serverlet running in web hosting in order to work, what about Zend Lucene library? I am also a bit confused what means "being implemented on the top of Lucene"? 回答1: Java Lucene, and all its ports to other languages, including Zend

Retrieve Laravel Model results based on multiple ID's

回眸只為那壹抹淺笑 提交于 2019-12-03 02:50:06
问题 I have implemented ZendSearch into my Laravel application. I am using it as my search engine where users will type a search word, and then ZendSearch will return me an array of results ordered by relevance. However, the array that ZendSearch returns, only returns my record ID's (it doesn't return any of the actual record information). What would next be the correct way to query my Model to retrieve the results based on the ZendSearch array results which is just an array of ID's ordered based

Retrieve Laravel Model results based on multiple ID's

让人想犯罪 __ 提交于 2019-12-02 14:47:26
I have implemented ZendSearch into my Laravel application. I am using it as my search engine where users will type a search word, and then ZendSearch will return me an array of results ordered by relevance. However, the array that ZendSearch returns, only returns my record ID's (it doesn't return any of the actual record information). What would next be the correct way to query my Model to retrieve the results based on the ZendSearch array results which is just an array of ID's ordered based on relevance. I know of Model::find(1) which would return my record with an ID of 1, but how can I feed

performance comparision between Zend Lucene and Java Lucene

时光毁灭记忆、已成空白 提交于 2019-11-30 05:22:23
Zend Lucene and Java Lucene are built in PHP and java repectively, and PHP language has a higher level than java. Just wondering How big the performance difference among these two, regarding to index building and data searching? Is it much more effective to let java create and rebuild index, and let php use the index? This is a quote from a Zend Certified Engineer. Against my better judgment, the company I work for migrated our previous search solution to Zend_Search_Lucene. On pretty heavy-duty hardware, indexing a million documents took several hours, and searches were relatively slow. The

performance comparision between Zend Lucene and Java Lucene

你离开我真会死。 提交于 2019-11-29 05:04:47
问题 Zend Lucene and Java Lucene are built in PHP and java repectively, and PHP language has a higher level than java. Just wondering How big the performance difference among these two, regarding to index building and data searching? Is it much more effective to let java create and rebuild index, and let php use the index? 回答1: This is a quote from a Zend Certified Engineer. Against my better judgment, the company I work for migrated our previous search solution to Zend_Search_Lucene. On pretty