lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: Issue with SpanQuery
Date Mon, 28 Apr 2014 22:19:23 GMT
Hi,

Can you paste your field definition of BookingRecordId and OrderLineType? It could be something
related to positionIncrementGap.

Ahmet



On Tuesday, April 29, 2014 12:58 AM, Ethan <eh198101@gmail.com> wrote:
Facing the same problem!! I have noticed it works fine as long as you're
looking up the first index position.

Anyone faced similar problem before?



On Mon, Apr 28, 2014 at 12:22 PM, Vijay Kokatnur
<kokatnur.vijay@gmail.com>wrote:

> I have been working on SpanQuery for some time now to look up multivalued
> fields and found one more issue  -
>
> Now if a document has following lookup fields among others
>
> "*BookingRecordId*": [ "100268421", "190131", "8263325" ],
>
> "*OrderLineType*": [ "13", "1", "11" ],
>
> Here is the query I construct -
>
> val q1 = new SpanTermQuery(new Term("BookingRecordId", "100268421"))
> val q2 = new SpanTermQuery(new Term("OrderLineType", "13"))
> val q2m = new FieldMaskingSpanQuery(q2, "BookingRecordId")
> val sp = Array[SpanQuery](q1, q2m)
>
> val q = new SpanNearQuery(sp, -1, false)
>
> Query to find element at first index position works fine -
>
> *{!span} BookingRecordId: 100268421 +OrderLineType:13*
> but query to find element at third index position doesn't return any
> result. -
>
> *{!span} BookingRecordId: 8263325 +OrderLineType:11 *
>
> If I increase the slope to 4 then it returns correct result. But it also
> matches BookingRecordId: 100268421 with OrderLineType:11 which is incorrect.
>
> I thought SpanQuery works for any multiValued field size.  Any ideas how I
> can fix this?
>
> Thanks,
> -Vijay
>


Mime
View raw message