lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <jack.krupan...@gmail.com>
Subject Re: Difference in query behavior.
Date Mon, 30 Nov 2015 21:42:26 GMT
The mm parameter or default operator logic only applies to the top level of
the query. Once you get nested in parentheses below the top level,
Solr/Lucene reverts to the default of the OR (SHOULD) operator.

-- Jack Krupansky

On Mon, Nov 30, 2015 at 5:45 AM, Modassar Ather <modather1981@gmail.com>
wrote:

> Hi,
>
> I have a query title:(solr lucene api). The mm is set to 100% using q.op as
> AND.
> When the query is executed it returns documnets having all the terms. It
> parses to following:
> +(title:solr title:faceting title:api)~3
>
> Similarlly I have another query like this topic:facet AND title:(solr
> lucene api) which is parsed as:
> +(+topic:facet +(title:solr title:lucene title:api)
>
> The second query is a subset of first query but it returns more results
> than the first.
> Per my understanding reason being that there are two clauses in second
> query 1) topic:facet which MUST occur and 2) (title:solr title:lucene
> title:api) any of the terms MUST occur.
> In first query there are 3 clauses which has SHOULD occur in between terms
> but due to 100% mm all terms are matched.
>
> Kindly help me understand how I can get the subset of result of query 1 by
> query 2.
> I understand if I put +/AND in between the clauses it will work but the
> same is not required in query one.
> Is there a way I can group the clauses which ensures that the first clause
> and the terms of other clause all should match as in the query first all
> the clauses are matched.
> Also let me know how ~ is different from phrase slop in the case of first
> query.
>
> Thanks,
> Modassar
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message