All span queries require positions to work; older Lucene released
failed to catch you if you tried to use a span query on a field that
did not index positions, but now Lucene 4.x does catch you (this is an
improvement).

You should double check your unit test: it really should not have been
passing in Lucene 3.5 if it did not index positions ...

Mike McCandless

http://blog.mikemccandless.com


On Tue, Aug 13, 2013 at 7:41 AM, Yonghui Zhao <zhaoyong...@gmail.com> wrote:
> One of my UT is passed In lucene 3.5, but it is failed in lucene4.3.
> The exception is:
>
> IllegalStateException("field \"" + term.field() + "\" was indexed without
> position data; cannot run SpanTermQuery (term=" + term.text() + ")");
>
>
> After I change index option of the field from DOCS_ONLY to
> DOCS_AND_FREQS_AND_POSITIONS, the test is passed.
>
> I am wondering what's the reason of this limit in lucene 4.3.
>
> Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to