You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by 王建新 <li...@gmail.com> on 2008/04/21 08:15:29 UTC

Need addtional info for Field

I want to use lucene with some additional info,like:

1.index
    Document additionalDoc=ew Document()

    additionalDoc.add(new Field("field","AA BB","Addtional info
..............."));
    additionalDoc.add(new Field("field","BB CC","Addtional info
222222222222222222222222..............."));

    writer.addDocument(additionalDoc)

    ........


2. search

    Searcher searcher;
    ....

    searcher.search(termQuery("field","BB"));




    in this condition, I want lucene returns the *additionalDoc ,* also know
which fileds were matched, then I will get the additional info from the
matched fields.

Can lucene make it in version 2.3.1?
if cannot, Can you give me some advice?

Thanks.