Get _search
{
"_source": {"
include": ["title.] Value "," DataType "," _score "]
},
" query ": {" bool ":
{"
should ": [
{"
query_string ": {
] Default_field ":" title. Value ",
" query ":" Basin ^10 unconformity "}}
]}
,
" sort ": {
" _score " : {
"order": "Dese"
},
"_script": {
"script": "' zone with Resource data ' in doc[' dataType '].values?2:(' other relevant information 5 ' In doc[' DataType '].values? 1:3) ",
Type": "string",
"order": "ASC"}
}
}
Es with the sort default can only be a numeric field, a Date field or a string field to sort, then, if we are to artificially let include field a in front of the Include field B, the current way is not satisfied.
It is therefore necessary to find another way to solve the problem by converting the given a and b to values 1 and 2 so that the required sort can be achieved. And it's the sort of thing that happens when the score is the same. implemented by scripting.