lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: PrefixQuery and hieracical queries problem
Date Fri, 19 Mar 2004 12:49:21 GMT
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 boils down to: Are there any alternatives to solve this 
> scenario in an efficient way?

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...

Best regards,
Andrzej Bialecki

Software Architect, System Integration Specialist
CEN/ISSS EC Workshop, ECIMF project chair
EU FP6 E-Commerce Expert/Evaluator
FreeBSD developer (

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

View raw message