zend-search-lucene

What is better ? One big field or many small?

旧时模样 提交于 2020-01-04 11:02:06
问题 I'm about writing a search engine based on Zend Search Lucène. My objects have many different fields (10 text type), and i would like to know which of these ways is the best. (All fields are unstored, just indexed, I don't need to recover them.) One big field, (concatenation of many small fields) : $content = $textfield1 . $textfield2 . $textfield3 . $textfield4 ... Zend_Search_Lucene_Field::unStored("content", $content); OR Many small fields : Zend_Search_Lucene_Field::unStored("content",

What is better ? One big field or many small?

我怕爱的太早我们不能终老 提交于 2020-01-04 11:00:06
问题 I'm about writing a search engine based on Zend Search Lucène. My objects have many different fields (10 text type), and i would like to know which of these ways is the best. (All fields are unstored, just indexed, I don't need to recover them.) One big field, (concatenation of many small fields) : $content = $textfield1 . $textfield2 . $textfield3 . $textfield4 ... Zend_Search_Lucene_Field::unStored("content", $content); OR Many small fields : Zend_Search_Lucene_Field::unStored("content",

Creating and updating Zend_Search_Lucene indexes

我与影子孤独终老i 提交于 2020-01-02 02:24:06
问题 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 =

Using Solr and Zends Lucene port together

﹥>﹥吖頭↗ 提交于 2019-12-19 21:18:40
问题 Afternoon chaps, After my adventures with Zend-Lucene-Search, and discovering it isn't all its cracked up to be when indexing large datasets, I've turned to Solr (thanks to Bill Karwin for that :) ) I've got Solr indexing the db far far quicker now, taking just over 8 minutes to index a table of just over 1.7million rows - which I'm very pleased with. However, when I come to try and search the index with the Zend port, I run into the following error; Fatal error: Uncaught exception 'Zend

Lucene Search in zf2

故事扮演 提交于 2019-12-13 15:01:48
问题 Has the Lucene Search library been removed from the ZendFramework 2? because I can't find it here 回答1: UPDATE: It has it's own repo here: https://github.com/zendframework/ZendSearch I couldn't find it. I wonder if it is interoperable with the previous version of the library. I also noticed that it was present in 1.9, but I don't see 1.9 available for download. There was work being done in the 2.0 branch here: https://github.com/Maks3w/zf2/commit/9796a6ff1f4fe71048b4f083f7ec746f4442e7dd This

Zend Search Lucene Matches

早过忘川 提交于 2019-12-12 02:05:34
问题 OK so let's say I have a search query giving me back some Zend_Search_Lucene_Search_QueryHit objects containing the Zend_Search_Lucene_Document object matching the query. I have a small question about how to retrieve simply the name of the field from the document matching the query str in order to highlight it?? I hope everything's clear and not to obvious to resolve :)... Thanks a lot Alex 回答1: Assuming "name", "address", "phone" are your fields of type Zend_Search_Lucene_Field::Text and you

Zend lucene - search within range

旧城冷巷雨未停 提交于 2019-12-11 17:09:12
问题 I have the following code to create the Zend Lucene index $doc->addField(Zend_Search_Lucene_Field::UnStored('keywords', $job->getKeywords())); $doc->addField(Zend_Search_Lucene_Field::UnStored('title', $job->getTitle())); $doc->addField(Zend_Search_Lucene_Field::UnStored('region', $job->getRegion())); $doc->addField(Zend_Search_Lucene_Field::keyword('minSalary', $minSalary)); $doc->addField(Zend_Search_Lucene_Field::keyword('maxSalary', $maxSalary)); $doc->addField(Zend_Search_Lucene_Field:

Install ZendSearch in ZF2 skeleton application

天大地大妈咪最大 提交于 2019-12-08 03:47:02
问题 I'm trying to add Lucene search to my ZF2 project. The package is not listed on the ZF2 packages page. I tried to workaround this by installing it manually from GitHub. I added this to my composer.json: "repositories": [{ "type": "package", "package": { "name": "zendframework/zendsearch", "version": "0.1", "source": { "url": "https://github.com/zendframework/ZendSearch.git", "type": "git", "reference": "master" } } }] and installed it via composer.phar: $ ./composer.phar require zendframework

Zend Lucene - How to do query

瘦欲@ 提交于 2019-12-06 12:29:02
问题 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-

CakePHP with Lucene

大憨熊 提交于 2019-12-06 09:35:27
问题 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 _