You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature: Extend the Terms Query to allow another query to be used as the "Terms lookup mechanism."
Currently, a specific document can be referenced from the terms query as a means of passing a lot of values to the terms query. Documented here: Terms Query - Terms lookup mechanism. I'm proposing making the lookup's "id" parameter optional, and adding a "query" parameter which supports the full query DSL.
This would give ElasticSearch a functional equivalent to this common SQL statement.
SELECT*FROM TableA a
WHEREa.Field1IN (SELECT DISTINCTb.Field2FROM TableB b
WHEREb.Field3LIKE'%blah%')
-- TableA & TableB could of course be the same table-- Field1, Field2, and Field3 could of course be the same field
Given my proposed change to the terms query, the equivalent in ES Query DSL to this SQL would be:
POST/TableA/_search{"query": {"terms": {"Field1": {"path": "Field2","index": "TableB","query": {//query parameter here, instead of id parameter"query_string": {"query": "*blah*","default_field": "Field3"}}}}}}
The text was updated successfully, but these errors were encountered:
Describe the feature: Extend the Terms Query to allow another query to be used as the "Terms lookup mechanism."
Currently, a specific document can be referenced from the terms query as a means of passing a lot of values to the terms query. Documented here: Terms Query - Terms lookup mechanism. I'm proposing making the lookup's "id" parameter optional, and adding a "query" parameter which supports the full query DSL.
This would give ElasticSearch a functional equivalent to this common SQL statement.
Given my proposed change to the terms query, the equivalent in ES Query DSL to this SQL would be:
The text was updated successfully, but these errors were encountered: