lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
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... should work fine in any application.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message