You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
jtibshirani
changed the title
Avoid overloading default search type to dfs_query_and_fetch?
Avoid overloading default search type to dfs_query_then_fetch?
Jul 27, 2021
Thanks for finding this. That value has been in there since this property was added in Spring Data Elasticsearch back in march 2014 - nowadays nobody knows why it was set to this value then.
This will be cleaned up together with the changes of #1885
Unless it's specified, the search type is set to
dfs_query_then_fetch
:spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core/query/AbstractQuery.java
Line 55 in d80d920
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, thedfs_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 settingdfs_query_then_fetch
.The text was updated successfully, but these errors were encountered: