lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nestel, Frank" <>
Subject Token retrieval question
Date Wed, 10 Oct 2001 07:22:55 GMT


I've been reading the API and I couldn't figure out a
nice and fast way to solve the following problem:

I'd like to enumerate the tokens of a document (or 
document field). Do the internal datastructures
of lucene allow such kind of traversal which is (as
I understand) of course orthogonal to the access lucene 
is optimized for? 

More concrete I have like 20-50 tokens/words and one
document and I'd like to ask the document if (and how often)
it contains those particular tokens. The idea was to augment
search results with (kind of I know) automatic query
dependand keywords.

The only way I see right now is to create 20-50 TermEnums
and walk through them until I end up in my document or
nowhere? Which is probably not feasible for a search result
page with (say) 20 hits in a larger index.

Any (more elegant) chance, I missed?

Thank you,

Dr. Frank Sven Nestel
Principal Software Engineer

COI GmbH    Erlanger Stra├če 62, D-91074 Herzogenaurach
Phone +49 (0) 9132 82 4611,
          COI - Solutions for Documents

View raw message