Skip to content

Avoid overloading default search type to dfs_query_then_fetch? #1884

Closed
@jtibshirani

Description

@jtibshirani

Unless it's specified, the search type is set to dfs_query_then_fetch:

protected SearchType searchType = SearchType.DFS_QUERY_THEN_FETCH;

The default search type in Elasticsearch itself is query_then_fetch. Compared to this Elasticsearch default, dfs_query_then_fetch performs an extra round trip to the nodes before starting the main search to gather term frequency information. In general, the dfs_query_then_fetch type is only used in special situations where exact text scoring is important.

To avoid adding the extra roundtrip, AbstractQuery could fall back to the Elasticsearch default instead of setting dfs_query_then_fetch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions