Get the App
SLTechnology News&Howtos  ›  Servers  › 

Elasticsearch multilevel nested query notes

Shulou Source: shulou.com Published: 2022-06-03 06:34:26 09月21日 Update

In a similar index, there is a field named process.tags.value, that is, when multi-level nesting occurs, the general term or match can no longer query the data. Query it in the following way:

SDK query:

QueryBuilder pathQuery = QueryBuilders.nestedQuery ("path"

QueryBuilders.boolQuery () .must (QueryBuilders.matchQuery (name, value)), ScoreMode.Total)

This.queryBuilders = this.queryBuilders.must (pathQuery)

Where the path variable corresponds to the upper level of multilevel nesting. For example, if the query path process.tags.value, then path is process.tags.

Tags: Queries that is variables fields data methods indexes paths notes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia Redmi Shulou Tech Info Apple