lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siddharth Vijayakrishnan <>
Subject TermPositionVector
Date Wed, 19 Jan 2005 06:50:49 GMT

I am adding a field to a document in the index as follows

doc.add(new     Field("contents",reader,Field.TermVector.WITH_POSITIONS))

Later,I query the index and get the document id of this document. The
following code, however, prints "false".

 TermFreqVector tfv = reader.getTermFreqVector(docId,"contents");
 System.out.println("Is a TermPositionVector  " + (tfv instanceof

Using Field.TermVector.WITH_POSITIONS_OFFSETS, while creating the
field, also produces the same result.

Can someone tell me why this is happening ? 


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

View raw message