No search found using Zend Lucene search

So I was working on a crawler script to index all the pages on my site using Zend Lucene search. I was able to get the script to work, but for some reason it won't find any other links in the pages. The problem is the script ends up in the find method:

$hits = $index->find('url:'.$targets[$i]);

      

When I execute the script, there are no hits in the array, so the crawler only indexes the starting URI. Any ideas on what I can try?

0


a source to share


2 answers


There is a lucene index lookup tool that will let you see what is being indexed. Luke should let you see what has been indexed and test some of the search terms.

Are you sure the url field is being indexed when you create the index, perhaps you can just store the information and not make it searchable:



AddField (Zend_Search_Lucene_Field :: UnIndexed

will not be found because it is not indexed

+2


a source


If you have numbers in your zip code this will help.



To learn how to use numeric values: Zend_Search_Lucene_Analysis_Analyzer :: setDefault (new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive ()); as the default analyzer. For more information see http://framework.zend.com/manual/en/zend.search.lucene.extending.html

0


a source







All Articles