lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Searching in paths
Date Wed, 15 Mar 2006 18:43:34 GMT

: What about such solution:
: Split path like string into smaller tokens and index them as seperate words eg:
: #Top/World/Poland/# #Top/World/# #Top/#

i would be careful about your use of the word "token" in that sentence,
but yes indexing each of the directory like paths as keywords and doing
TermQueries on the path you are interested in should work fine.  you can
do this in a seperate field if you want to be suport both "parent path"
searches and "exact path" searchs.

Another way to eliminate hte TooManyClauses exception from doing a prefix
search without needing to change your index, is to use a PrefixFilter
wrapped in ConstantScoreQuery.  CSR is in lucene 1.9, but i believe
PrefixFIlter has only been commited to the Solr code base...

http://incubator.apache.org/solr/
http://svn.apache.org/viewcvs.cgi/incubator/solr/trunk/src/java/org/apache/solr/search/PrefixFilter.java?rev=382610&view=markup

...it should work fine in any application.

-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message