lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsanctus <>
Subject Span Query on different fields
Date Tue, 18 Sep 2007 17:22:39 GMT

I have an index with tree fields (field1, field2,field3).
I have to do an or-query and get term positions within a document.
So I'm using span query but I have a problem because
with spans I can't write
SpanTermQuery field1 = new SpanTermQuery(new Term("field1", "hello"));
SpanTermQuery field2 = new SpanTermQuery(new Term("field2", "hello"));
SpanTermQuery field3 = new SpanTermQuery(new Term("field3", "hello"));
SpanOrQuery or = new SpanOrQuery(new SpanQuery[] {field1, field2,field3});
With this code I get an error because SpanOrQuery Clauses must have same

My question is:
Is defined a field positions iterator on Spans or other structure ???

Can you help me???

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message