lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: Access indexed terms
Date Fri, 14 May 2010 10:30:03 GMT
On 2010-05-14 11:35, manjula wijewickrema wrote:
> Hi,
> Is it possible to put the indexed terms into an array in lucene. For
> example, imagine I have indexed a single document in Lucene and now I want
> to acces those terms in the index. Is it possible to retrieve (call) those
> terms as array elements? If it is possible, then how?

In short: unless you created TermFrequencyVector when adding the
document, the answer is "with great difficulty".

For a working code that does this see here:

If you really need such kind of access in your application then add your
documents with term vectors with offsets and positions. Even then,
depending on the Analyzer you used, the process is lossy - some input
data that was discarded by Analyzer is simply no longer available.

Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration  Contact: info at sigram dot com

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

View raw message