lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <m...@ctx.com.au>
Subject Re: PrefixQuery and hieracical queries problem
Date Sat, 20 Mar 2004 02:59:49 GMT
Dennis,

I've attached some sample code that works well for my needs. You should
find it scales very well, even when you search for a "parentpath" near
the root.

The output I get from running this program is:

query:  name:rt.jar
   D:\opt\j2sdk1.4.2\jre\lib\rt.jar

query:  name:LICENSE
   D:\opt\j2sdk1.4.2\jre\LICENSE
   D:\opt\j2sdk1.4.2\LICENSE

query:  fullpath:"D:\opt\j2sdk1.4.2\LICENSE"
   D:\opt\j2sdk1.4.2\LICENSE

query:  parentpath:"D:\opt\j2sdk1.4.2\include"
   D:\opt\j2sdk1.4.2\include\jawt.h
   D:\opt\j2sdk1.4.2\include\jni.h
   D:\opt\j2sdk1.4.2\include\jvmdi.h
   D:\opt\j2sdk1.4.2\include\jvmpi.h
   D:\opt\j2sdk1.4.2\include\win32\jawt_md.h
   D:\opt\j2sdk1.4.2\include\win32\jni_md.h



=Matt



Dennis Thrys√łe wrote:
> Andrzej Bialecki wrote:
> 
>> What about using PhraseQuery, and store the path with all but first 
>> path separator replaced by whitespace (i.e. "/foo bar baz one two 
>> three"). Then you could query for "/foo bar", "/foo bar baz", and so 
>> on...
> 
> 
> That sounds like a really good suggestion. I'll try that. Thanks.
> 
> -dennis
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 




Mime
View raw message