lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Messer <bernhard.mes...@intrafind.de>
Subject Re: TermPositionVector
Date Thu, 20 Jan 2005 18:22:00 GMT
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: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
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