Siddarth,

i tested your code and the return is "true" and not "false" as you wrote. I assume that there is somethinf else which is wrong.

Bernhard

Siddharth Vijayakrishnan schrieb:

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to