Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Reference/
  3. Query languages/
  4. QueryDSL

Joining queries

Performing full SQL-style joins in a distributed system like Elasticsearch is prohibitively expensive. Instead, Elasticsearch offers two forms of join which are designed to scale horizontally.

nested query
Documents may contain fields of typenested. These fields are used to index arrays of objects, where each object can be queried (with thenested query) as an independent document.
has_child andhas_parent queries
Ajoin field relationship can exist between documents within a single index. Thehas_child query returns parent documents whose child documents match the specified query, while thehas_parent query returns child documents whose parent document matches the specified query.

Also see theterms-lookup mechanism in theterms query, which allows you to build aterms query from values contained in another document.

Joining queries will not be executed ifsearch.allow_expensive_queries is set to false.


[8]ページ先頭

©2009-2026 Movatter.jp