elastic/elasticsearch

Consistency between `_search` and `_msearch`

Open

#4.227 aberto em 21 de nov. de 2013

Ver no GitHub
 (42 comments) (1 reaction) (0 assignees)Java (25.882 forks)batch import
:Search Foundations/Search>bugTeam:Search Foundationsgood first issuehelp wantedpriority:normal

Métricas do repositório

Stars
 (76.700 stars)
Métricas de merge de PR
 (Mesclagem média 2d) (1.000 fundiu PRs em 30d)

Description

The _msearch API doesn't accept the same header parameters than _search's query parameters. For instance version is both valid in the search body and query parameters for _search, but is ignored in the query parameters and header in _msearch.

MultiSearchRequest.add() should rely on RestSearchAction.parseSearchSource() or even RestSearchAction.parseSearchRequest() to parse the subrequests, for maximum compatibility.

IMHO, a clean bulk API should use the header parameters as query parameters on the target endpoint, which would imply that they keep in sync no matter the code changes in the target endpoints.

Guia do colaborador