Hi,

I have a field to which I add several bits of information, e.g.

doc.add(new Field("x", "first bit"));
doc.add(new Field("x", "second part"));
doc.add(new Field("x", "third section"));

I am using SpanFirstQuery to search them with something like:

while...
  SpanTermQuery stquery = new SpanTermQuery(new Term("x", termStr[incFactor]));
  query = new SpanFirstQuery(stquery, incFactor);
  incFactor++

but a search for

"first", span pos 1
"bit", span pos 2

gets a match, but

"second", span pos 1
"part", span pos 2

fails. How can I get the first term position for each word in each Field added to the document for the same field name to be 1, so that the SpanFirst works.

Antony






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

Reply via email to