lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Diviacco <patrick.divia...@gmail.com>
Subject Re: termFreqVector is always null ?
Date Thu, 21 Apr 2011 09:08:39 GMT
Nevermind, I've solved by indexing the fields with with Field.TermVector.YES

doc.add(new Field("tags", "foo bar", Store.NO, Index.ANALYZED,
        Field.TermVector.YES));



On 21 April 2011 10:57, Patrick Diviacco <patrick.diviacco@gmail.com> wrote:

> Hi,
>
> for any document, the termFreqVector is always null.
> I'm sure the documents are in the collection and the field exist. So where
> is the problem ?
>
> for (int i = 0; i < reader.numDocs(); i++){
>     TermFreqVector tfv = reader.getTermFreqVector(i, "tags");
>
> thanks
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message