On 3/9/2016 12:07 AM, Modassar Ather wrote:
> Kindly help me understand the parsing of following query. I am using
> edismax parser and Solr-5.5.0.
> q.op is set to AND and there is no explicit mm value set.
>
> fl:(java OR book) => "boost(+((fl:java fl:book)~2),int(val))"
>
> When the query has explicit OR then why the ~2 is present in the parsed
> query?

The ~2 syntax, when not attached to a phrase query (quotes) is the way
you express a fuzzy query.  If it's attached to a query in quotes, then
it is a proximity query.  I'm not sure whether it means something
different when it's attached to a query clause in parentheses, someone
with more knowledge will need to comment.

> How can I achieve following?
> "boost(+((fl:java fl:book)),int(val))"
>
> The reason being the ANDed and ORed queries both returns the same number of
> documents. But what expected is that the ORed query should have more number
> of documents.

Normally I would say that if you get the same number of documents with
both "AND" & "OR" then it means that every document that contains "java"
also contains "book" ... but since you are running version 5.5.0, there
is a bug report that describes what you are seeing:

https://issues.apache.org/jira/browse/SOLR-8812

Thanks,
Shawn

Reply via email to