hi,
i want to know what's the difference for score theory and sort principle between elasticsearch6.8.0 and elasticsearch5.4.3? i use match clause and _all in elasticsearch5.4.3 as below:
{
"query" : {
"match" : {
"_all" : {
"query" : "app",
"operator" : "AND"
}
}
}
}
and multi_match with cross_fields in elasticsearch6.8.0
{
"query" : {
"multi_match" : {
"query" : "and",
"type" : "cross_fields",
"operator" : "and"
}
}
}
but finally return result is not same according to _score to sort
for elasticsearch5.4.3 i use clause to validate search api to get the explain result:
{
"index": "testforms",
"valid": true,
"explanation": "+function score (_all:custom, functions: [{filter(TitleFieldAC:customer), function [org.elasticsearch.common.lucene.search.function.WeightFactorFunction@fe2b450d]}{filter(BestInClass:yes), function [org.elasticsearch.common.lucene.search.function.WeightFactorFunction@cfab450d]}]) #(+StatusFilter:Published +IsDeleted:[0 TO 0])"
}
but in elasticsearch6.8.0 i get below result:
{
"index": "testforms",
"valid": true,
"explanation": "+function score ((Metadata-ReviewAssignTo_relationsvalue.StaffId:customer |
BestInClass:custom |
TitleFieldAC:customer |
StatusFilter:customer |
functions: [{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@ab1688f4}{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@8ccee3c1}{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@b28704de}{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@45c10606}{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@41e10606}{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@874e5aa1}{org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$FilterScoreFunction@be25c100}]) #(+StatusFilter:Published +IsDeleted:[0 TO 0])"
}
i want to know what's the difference between elasticsearch5.4 and elasticsearch6.8, and why change it, any benefits using elasticsearch6.x new function?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.