Skip to content

Commit

Permalink
add missing metrics to the es config
Browse files Browse the repository at this point in the history
  • Loading branch information
jillesvangurp committed Sep 14, 2023
1 parent de49c65 commit 854bfac
Showing 1 changed file with 86 additions and 2 deletions.
88 changes: 86 additions & 2 deletions src/jsMain/resources/es-movie-quotes-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,99 @@
},
{
"type": "str",
"name": "text",
"name": "q",
"defaultValue": "",
"placeHolder": ""
}
],
"metrics": [
{
"name": "PrecisionAtK",
"metric": "PrecisionAtK",
"params": [
{
"name": "k",
"value": 5
},
{
"name": "relevantRatingThreshold",
"value": 1
}
]
},
{
"name": "RecallAtK",
"metric": "RecallAtK",
"params": [
{
"name": "k",
"value": 5
},
{
"name": "relevantRatingThreshold",
"value": 1
}
]
},
{
"name": "MeanReciprocalRank",
"metric": "MeanReciprocalRank",
"params": [
{
"name": "k",
"value": 5
},
{
"name": "relevantRatingThreshold",
"value": 1
}
]
},
{
"name": "ExpectedReciprocalRank",
"metric": "ExpectedReciprocalRank",
"params": [
{
"name": "k",
"value": 5
},
{
"name": "maxRelevance",
"value": 5
}
]
},
{
"name": "DiscountedCumulativeGain",
"metric": "DiscountedCumulativeGain",
"params": [
{
"name": "k",
"value": 5
},
{
"name": "useLinearGains",
"value": false
}
]
},
{
"name": "NormalizedDiscountedCumulativeGain",
"metric": "NormalizedDiscountedCumulativeGain",
"params": [
{
"name": "k",
"value": 5
},
{
"name": "useLinearGains",
"value": false
}
]
}
],
"pluginSettings": {
"queryTemplate": "{\n \"size\": {{size}},\n \"query\": {\n \"bool\": {\n \"should\": [\n {\n \"multi_match\": {\n \"query\": \"{{text}}\",\n \"fields\": [\"quote^2\",\"movie\"]\n }\n },\n {\n \"multi_match\": {\n \"query\": \"{{text}}\",\n \"fields\": [\"quote^2\",\"movie\"],\n \"type\": \"phrase_prefix\",\n \"boost\": 2.0\n }\n },\n {\n \"multi_match\": {\n \"query\": \"{{text}}\",\n \"fields\": [\"quote^2\",\"movie\"],\n \"type\": \"cross_fields\",\n \"boost\": 2.0\n }\n },\n {\n \"multi_match\": {\n \"query\": \"{{text}}\",\n \"fields\": [\"quote^2\",\"movie\"],\n \"type\": \"best_fields\",\n \"boost\": 0.1,\n \"fuzziness\": \"AUTO\"\n }\n }\n ]\n }\n }\n}",
"queryTemplate": "{\n \"size\": {{size}},\n \"query\": {\n \"bool\": {\n \"should\": [\n {\n \"multi_match\": {\n \"query\": \"{{q}}\",\n \"fields\": [\"quote^2\",\"movie\"]\n }\n },\n {\n \"multi_match\": {\n \"query\": \"{{q}}\",\n \"fields\": [\"quote^2\",\"movie\"],\n \"type\": \"phrase_prefix\",\n \"boost\": 2.0\n }\n },\n {\n \"multi_match\": {\n \"query\": \"{{q}}\",\n \"fields\": [\"quote^2\",\"movie\"],\n \"type\": \"cross_fields\",\n \"boost\": 2.0\n }\n },\n {\n \"multi_match\": {\n \"query\": \"{{q}}\",\n \"fields\": [\"quote^2\",\"movie\"],\n \"type\": \"best_fields\",\n \"boost\": 0.1,\n \"fuzziness\": \"AUTO\"\n }\n }\n ]\n }\n }\n}",
"index": "",
"labelFields": [
"quote",
Expand Down

0 comments on commit 854bfac

Please sign in to comment.