Adjust ranking of should_match_bool_prefix queries (#130)

fixes #114
This commit is contained in:
Rok Garbas 2020-07-09 22:28:49 +02:00 committed by GitHub
parent 71eba22a0e
commit 4173453098
Failed to generate hash of commit

View file

@ -399,7 +399,7 @@ makeRequest options channel queryRaw from size =
[ ( field
, Json.Encode.object
[ ( "query", Json.Encode.string query )
, ( "boost", Json.Encode.float boost )
, ( "boost", Json.Encode.float <| boost_base * boost )
, ( "analyzer", Json.Encode.string "whitespace" )
, ( "fuzziness", Json.Encode.string "1" )
, ( "_name"
@ -428,7 +428,7 @@ makeRequest options channel queryRaw from size =
[ ( field
, Json.Encode.object
[ ( "query", Json.Encode.string query )
, ( "boost", Json.Encode.float boost )
, ( "boost", Json.Encode.float <| boost_base * boost )
, ( "analyzer", Json.Encode.string "whitespace" )
, ( "fuzziness", Json.Encode.string "1" )
, ( "_name"
@ -442,9 +442,9 @@ makeRequest options channel queryRaw from size =
)
]
)
[ ( "package_attr_name", 1 )
[ ( "package_attr_name", 2 )
, ( "package_attr_name_query", 1 )
, ( "package_pname", 1 )
, ( "package_pname", 3 )
]
should_terms boost_base =