What is the ElasticSearch equivalent for an SQL subquery?

后端 未结 3 642
刺人心
刺人心 2020-12-06 10:06

Can you nest queries logically in ElasticSearch, so the output of one query is the input to another query. Another, way to ask is how can I chain or pipe queries together?

相关标签:
3条回答
  • 2020-12-06 10:46

    Elasticsearch doesn't support subqueries; you would need to perform your first query, then construct a second query using the results of the first query as an input.

    0 讨论(0)
  • 2020-12-06 10:47

    That is totally correct, you must programm a subquery in your favorite programming language. An example can be found here:

    http://www.sebastianviereck.de/en/elasticsearch-subquery-scoring-optimization/

    0 讨论(0)
  • 2020-12-06 10:58

    this is not supported in elastic-search you must normalize your data and have all field you need in one setting

    0 讨论(0)
提交回复
热议问题