lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <>
Subject Re: About PrefixQuery
Date Sun, 09 Mar 2003 14:33:24 GMT
On Sunday 09 March 2003 02:46, Ype Kingma wrote:
> Gentlefolk,
> You'll need a termDocs() from an IndexReader to do that, and that means
> you'll be accessing not only the terms, but also the part of the index that
> gives the term frequencies in each document. You'll then have to check
> whether your document shows up in these TermDocs (I hope I recall the API
> names correctly).
> Since this extends the scope of term expansion to query search, I think
> you might consider not implementing it for term expansion.
> It means that the implementation might become an order of magnitude slower
> due to the need to access other parts of the index.

Ok, thanks for explanation... I was afraid there might not be really efficient 
way of doing that, and I guess that is the case.

I wasn't planning to do this as part of implementation of other 2 
alternatives, so slowness would only be problem for this specific usage... 
however, perhaps it wouldn't even be needed that often. Highlighters may want 
to know which terms did occur (to list them, instead of all terms in the 
query), especially for wildcard queries, but that's the only use case for 
this feature I can think of.


-+ Tatu +-

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

View raw message