hi all
    I need to return certain fields of all matched documents quickly.
I am now using Document.get(field), but the performance is not well
enough. Originally I use HashMap to store these fields. it's much
faster but I have to maintain two storage systems. Now I am
reconstructing this project. I want to store everything in lucene.
    when I use an IndexSearcher to perform searching, I can get
related fields by docID. it must thread safe. And like the IndexReader
it's a snapshot of the index
    Here are some solutions I can come up with:
    1. StringIndex
       I have considered StringIndex but some fields need to tokenize.
maybe I can use two fields, one is tokenized for searching. Another is
indexed but not analyzed, the later one is only used for StringIndex.
If there is any better solution, maybe I have to use this one.
    2. Associating a Map with each IndexReader
       when the IndexReader is opened or reopened, I need to iterate
through each documents of this Reader and put everything into a map.
The problem is it's slower and I don't know whether it's problematic
with NRT.

    is there any other better solution? thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to