Hi
I want to search my publications for a word or phrase, but only within
certain categories. Sounds simple, but I can't make it work :( I add the
text + category (int) to my index for each document
foreach ($story->getPages() as $page ){
$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::text('myText',
$page->text,'UTF-8'));
$doc->addField(Zend_Search_Lucene_Field::text('category',
$page->category));
}
Searching I've tried various combinations. Basically I'd like to list
results with a given text and ONLY within the given categories. I'd think
the following would work:
"+(text:mySearchTerm) (+category:10 +category:8)"
But other categories are returned as well :( Am I doing something wrong or
should that work?
--
View this message in context:
http://n4.nabble.com/simple-search-lucene-question-tp1311739p1311739.html
Sent from the Zend Framework mailing list archive at Nabble.com.