Hi Hoss,

Thanks for feedback -- it sucks to know more about the deep internals
like index merging and so little about end-user facing stuff like
query parsers, I should educate myself on those fronts.

> Maybe i'm missunderstanding the objective,

I can't say for sure, but it seems like the customer wishes to favor
precision over recall and be able to search for longer phrases, while
allowing certain distortions. Think: "Lebron James nike shoes" and
allowing some term reorderings and some missing terms (a document with
just "lebron's nike shoes" should match).

This isn't generic search where just scoring better matches and
pulling them up to the top is enough. We also want to get rid of
documents without enough key terms (hence the need for
minShouldMatch).

This is all my guess, but seems like a valid intent/ use case to me
and I was a bit surprised at not being able to help that person with
formulating a single query (or Solr edismax parameters) that could do
it.

> how you could do what you want (or at least what i think you want) with the 
> existing span queries?

In terms of code-level I was thinking of a custom query and
subclassing FilterSpans, then applying minShouldMatch to a
single-term-based "should" SpanNearQuery (in order, slop factor).
There are other alternatives but they can lead to an explosion of
query clauses so I don't think it's a good way to go. Other ideas
welcome.

Dawid

On Fri, Oct 6, 2017 at 12:06 AM, Chris Hostetter
<hossman_luc...@fucit.org> wrote:
>
> : I've been asked today about whether there is a way to express a query like:
> :
> : q="foo bar baz"
>
>
> : My tentatively answer based on the code is that mm (min should match)
> : only applies to Boolean queries (clauses), so there is no way to mix
>
> that is correct -- minNrShouldMatch is only a BQ concept (the "should"
> literally refers to the SHOULD clause type)
>
> : it with phrase queries... One could simulate this with span queries,
> : but there is no query parser available that would permit creating such
> : a query from user input.
>
> Maybe i'm missunderstanding the objective, because i can't at all imagine
> how you could do what you want (or at least what i think you want) with
> the existing span queries?
>
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to