Pretty neat. Thanks!

On Fri, Apr 25, 2014 at 2:44 AM, Ahmet Arslan <iori...@yahoo.com> wrote:

> Hi,
>
> I am not sure how OR clauses are executed.
>
> But after re-reading your mail, I think you can use SpanOrQuery (for your
> q1) in your custom query parser plugin.
>
> val q2 = new SpanOrQuery(
>                         new SpanTermQuery(new Term("BookingRecordId",
> "ID_1")),
>                         new SpanTermQuery(new Term("BookingRecordId",
> "ID_N"))
> );
>
>
>
>
> On Friday, April 25, 2014 3:22 AM, Vijay Kokatnur <
> kokatnur.vi...@gmail.com> wrote:
> Thanks Ahmet. It worked!
>
> Does solr execute these nested queries in parallel?
>
>
>
> On Thu, Apr 24, 2014 at 12:53 PM, Ahmet Arslan <iori...@yahoo.com> wrote:
>
> > Hi Vijay,
> >
> > May be you can use _query_ hook?
> >
> > _query_:"{!span}BookingRecordId:234 OrderLineType:11" OR _query_:"{!span}
> > OrderLineType:13 + BookingRecordId:ID_N"
> >
> > Ahmet
> >
> >
> > On Thursday, April 24, 2014 9:34 PM, Vijay Kokatnur <
> > kokatnur.vi...@gmail.com> wrote:
> > Hi,
> >
> > I have defined a SpanQuery for proximity search like -
> >
> > val q1 = new SpanTermQuery(new Term("BookingRecordId", "234"))
> > val q2 = new SpanTermQuery(new Term("OrderLineType", "11"))
> > val q2m = new FieldMaskingSpanQuery(q2, "BookingRecordId")
> > val sp = Array[SpanQuery](q1, q2m)
> >
> > val q = new SpanNearQuery(sp, -1, false)
> >
> > Query:
> > *&fq={!span} BookingRecordId: 234+OrderLineType11*
> >
> > However, I need to look up by multiple BookingRecordIds with an OR -
> >
> > *&fq={!span}OrderLineType:"13" + (BookingRecordId:ID_1 OR ... OR
> > BookingRecordId:ID_N)*
> >
> > I can't specify multiple *span* in the same query like -
> >
> > *{!span} OrderLineType:"13" + BookingRecordId:ID_1 OR ... OR {!span}
> > OrderLineType:"13" + BookingRecordId:ID_N*
> >
> > Is there any recommended to way to achieve this?
> > Thanks, Vijay
> >
> >
>
>

Reply via email to