Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Matt Quail
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\j2sd

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Andrzej Bialecki
Dennis Thrysøe wrote: Andrzej Bialecki wrote: Anyway.. I should've added that for Phrase Queries to work the text must be tokenized. So, the best way in this case would be to use WhitespaceAnalyzer for the uri field, I've figured out how to use the WhitespaceAnalyzer for creating the PhraseQ

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Otis Gospodnetic
PerFieldAnalyzerWrapper ? Otis --- Dennis_Thrysøe <[EMAIL PROTECTED]> wrote: > Andrzej Bialecki wrote: > > Anyway.. I should've added that for Phrase Queries to work the text > must > > be tokenized. So, the best way in this case would be to use > > WhitespaceAnalyzer for the uri field, > > I'

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Dennis Thrysøe
Andrzej Bialecki wrote: Anyway.. I should've added that for Phrase Queries to work the text must be tokenized. So, the best way in this case would be to use WhitespaceAnalyzer for the uri field, I've figured out how to use the WhitespaceAnalyzer for creating the PhraseQuery, but I suspect I shou

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Dennis Thrysøe
Andrzej Bialecki wrote: 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... Hi, It doesn

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Andrzej Bialecki
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... Hi, It doesn't seem to work though -

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Dennis Thrysøe
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... Hi, It doesn't seem to work though - unless I'm missing somethi

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Dennis Thrysøe
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

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Andrzej Bialecki
Dennis Thrysøe wrote: Hi, The only alternative I can think of would be to store a whitespace seperated list of all ancestors along with a document: /foo /foo/bar /foo/bar/baz But this has two drawbacks: Index storage space used, and the cost of indexing (finding all ancestors). So my question

Re: PrefixQuery and hieracical queries problem

2004-03-19 Thread Matt Quail
Dennis Thrysøe wrote: The only alternative I can think of would be to store a whitespace seperated list of all ancestors along with a document: /foo /foo/bar /foo/bar/baz I think you will find that this kind of approach works very well (as it has for me). But instead of adding one field named "p

PrefixQuery and hieracical queries problem

2004-03-19 Thread Dennis Thrysøe
Hi, I'm seeking any kind of advice that I can find to solve a problem I've run into with using lucene. I'm integrating lucene as an alternative to other methods of indexing and searching that already exist in our product. Therefore it would be best if I could make the integration of lucene liv