Is there an opposite of dismaxquery? E.g. take the minimum score of two queries?

Hi all

Basically I have two queries that I would like to combine in a somewhat
unusual way.

Lets say query A is "Albino Melanism" and query B is* "Elephant Tiger"*.
I have lots of search results which have either one or the other, but I am
mostly interested in those where both queries return at least some score.
Any text only containing all the words of query A or query B should be
scored lower than a query containing some of query A and query B. (e.g. the
document with the text "Albino Melanism ..." is worth nothing if there is
no mention of an elephant or tiger, I'd rather have the text "Albino
Elephant ..." with no mentions of tigers / melanism)

A dismax query does pretty much the opposite of what I want to do: It takes
two subqueries and returns the maximum. However I actually want the minimum
of those subqueries.

Is there a way to do this with elasticsearch?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/273ed06f-3eda-4e67-85b7-ea7bca83ebea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

A dismax query will basically rewrite the query as a boolean query. Can you
create your own query where one of the clauses has a negative boost? Still
tricky since you basically need the inverse of cross/best_field where the
field remains the same, but the query changes.

--
Ivan

On Thu, Aug 28, 2014 at 2:26 AM, Lucas Brönnimann acriaos@gmail.com wrote:

Hi all

Basically I have two queries that I would like to combine in a somewhat
unusual way.

Lets say query A is "Albino Melanism" and query B is* "Elephant Tiger"*.
I have lots of search results which have either one or the other, but I am
mostly interested in those where both queries return at least some score.
Any text only containing all the words of query A or query B should be
scored lower than a query containing some of query A and query B. (e.g. the
document with the text "Albino Melanism ..." is worth nothing if there is
no mention of an elephant or tiger, I'd rather have the text "Albino
Elephant ..." with no mentions of tigers / melanism)

A dismax query does pretty much the opposite of what I want to do: It
takes two subqueries and returns the maximum. However I actually want the
minimum of those subqueries.

Is there a way to do this with elasticsearch?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/273ed06f-3eda-4e67-85b7-ea7bca83ebea%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/273ed06f-3eda-4e67-85b7-ea7bca83ebea%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAsk7c%2BFwgXqg-tzC1VEfrKK5q%2BAYXbu2KN_3Hnjf0qMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.