Hi Vijay,
It is a index time setting so yes solr restart and re-indexing is required. So A small test case would be handy On Tuesday, April 29, 2014 1:35 AM, Vijay Kokatnur <kokatnur.vi...@gmail.com> wrote: Thanks Ahmet, I'll give that a try. Do I need to re-index to add/update positionIncrementGap? On Mon, Apr 28, 2014 at 3:31 PM, Ahmet Arslan <iori...@yahoo.com> wrote: > Hi, > > I would add positionIncrementGap to fieldType definitions and experiment > with different values. 0, 1 and 100. > > > <fieldType name="token" class="solr.TextField" omitNorms="true" > positionIncrementGap="1"> > > Same with OrderLineType too > > > > > On Tuesday, April 29, 2014 1:25 AM, Vijay Kokatnur < > kokatnur.vi...@gmail.com> wrote: > Hey Ehmet, > > Here is the field def - > > <field name="BookingRecordId" type="token" indexed="true" stored="true" > multiValued="true" omitTermFreqAndPositions="false"/> > > <fieldType name="token" class="solr.TextField" omitNorms="true"> <analyzer> > <tokenizer class="solr.KeywordTokenizerFactory"/> <filter > class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> > > > > > > On Mon, Apr 28, 2014 at 3:19 PM, Ahmet Arslan <iori...@yahoo.com> wrote: > > > 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 <eh198...@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.vi...@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 > > > > > > > >