lucene-java-user mailing list archives

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

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
TermPositionVector));

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

Can someone tell me why this is happening ? 


Thanks,
Siddharth

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


Mime
View raw message