The documentation for Zend_Search_Lucene isn't really clear about how
to find existing documents in the current index. Take the following
from the docs:
$removePath = ...;
$hits = $index->find('path:' . $removePath);
foreach ($hits as $hit) {
$index->delete($hit->id);
}
Now I assume that this means that you've registered a field named
'path' for each document in the index.
For my particular application pages are identified in the index and in
the database by an integer identifier. But for some reason the
following doesn't work correctly:
$page = ...;
$hits = $index->find('pid:' . (int) $page->getId (); // Doesn't return
any hits!
I have an inkling that the $index->find () method is stripping out all
non-alphabetical values. Is this the case and is there a work around
for this??
--
Mathew Byrne
http://www.matbyrne.com/