How can I add the first the PayloadNearQuery, I only add clauses.. (It is
only one term I did the following code - this code doesn't provide the
needed effect).
SpanTermQuery [] spanTerms = new SpanTermQuery[terms.length];
spanTerms[0] = new PayloadTermQuery(new Term(field,terms[0]),new
AveragePayloadFunction());
for (int i=1 ; i<terms.length ; i++)
{
spanTerms[i] = new SpanTermQuery(new Term(field,terms[i]));
}
SpanNearQuery x = new SpanNearQuery(spanTerms, 0, true);
-----Original Message-----
From: Uwe Schindler [mailto:[email protected]]
Sent: Monday, December 21, 2009 9:45 PM
To: [email protected]
Subject: RE: PayloadNearQuery
It is as you describe:
PayloadTermQuery is a subclass of SpanQuery. So create a SpanNearQuery with
slop=0 and order=true and add first the PayloadNearQuery, then the rest of
the phrase terms as SpanTermQuery in order of appearance.
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]
> -----Original Message-----
> From: Elias Khsheibun [mailto:[email protected]]
> Sent: Monday, December 21, 2009 6:51 PM
> To: [email protected]
> Subject: PayloadNearQuery
>
> I want to have the effect of handling the first term of a phrase query
> as a PayloadTermQuery and for the others just normal handling ... how
> can I do that ?
>
>
>
> ---------------------------------------------------------------------
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]