lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: regaridng Reader.terms()
Date Tue, 22 May 2007 11:05:57 GMT
I would use a term vector to get this.  See  
IndexReader.getTermFreqVector.  You can get the term vector for just  
field 3.

-Grant

On May 22, 2007, at 5:29 AM, Mohammad Norouzi wrote:

> Hi all
>
> consider following index
>
> field1           field2                              field3
> text1           text1 text2                      text3 text4
> text4           text2                              text2 text3 text5
>
> I want to get all terms in filed3
> if I use Reader.terms() it will returns: (however i have to put an if
> statement to filter result of the field3 only)
> text3
> text4
> text2
> text5
>
> but I need following result:
> "text3 text4"
> "text2 text3 text5"
>
>
> is this possible? if yes, how? and if no, is there any tricky way  
> to get
> this result?
>
> thank you so much.
>
> -- 
> Regards,
> Mohammad Norouzi
> --------------------------
> see my blog: http://brainable.blogspot.com/

--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp

Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ 
LuceneFAQ



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


Mime
View raw message