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
Copy file name to clipboardExpand all lines: README.md
+92-7Lines changed: 92 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,15 @@ Follow the standard plugin installation instructions, with a zip version of the
24
24
"rescore": {
25
25
"redis":{
26
26
"key_field": "productId.keyword",
27
-
"key_prefix": "mystore-",
28
-
"score_operator": "MULTIPLY"
27
+
"key_prefixes": ["mystore-","gympass-"],
28
+
"score_weights": [0.5, 1.0],
29
+
"score_operator": "ADD",
30
+
"boost_operator": "ADD",
31
+
"boost_weight": 1.0
29
32
}
30
33
}
31
34
}
32
35
```
33
-
34
36
In this example, we are expecting each hit to contain a field `productId` (of keyword type). The value of that field will be looked up in Redis as a key (for example, Redis key `mystore-abc123` will be looked-up for a document with productId abc123; the `mystore-` key prefix is configurable in query time).
35
37
The `score_operator` field is the operator you want to be using when doing your final rescore, you can use `ADD`, `MULTIPLY`, or `SUBTRACT`.
36
38
@@ -41,7 +43,92 @@ You can use `0` to demote results (e.g. mark as unavailable in stock), `1` to le
41
43
<br/>
42
44
<br/>
43
45
44
-
# Plugin Builder and Installation
46
+
# Fields and how to use them
47
+
48
+
<br/>
49
+
50
+
## --> `key_prefixes` : str[]
51
+
A list that contains the `key_prefixes` to use
52
+
53
+
<br/>
54
+
55
+
## --> `score_weights` : float[]
56
+
A list that holds the weight value for each of the key_prefixes in the `key_prefixes` field.
57
+
For example, in the **Usage** section, the `key_prefix`*"mystore-"* is beeing multiplied by **0.5** and the *"gympass-"* for **1**.
58
+
59
+
<br/>
60
+
61
+
## --> `boost_weight` : float
62
+
Holds the weight value of the **elasticsearch_score**.
63
+
For example, if the **elasticsearch_score** is **2** and the `boost_weight`**0.5** then the final **elasticsearch_score** will be **1**.
By default the plugin will think that your **Redis** server is running in the `localhost:6379` , that beeing said, you can change the `Host` but not the `Port`.
119
+
The `Port` will always be `6379` because that's the default `Port` for the **Redis** server to run on.
120
+
<br/>
121
+
To change the `Host`, you first need to go to the `config` folder in your **ElasticSearch** dir.
122
+
There open the `elasticsearch.yml` file, you want to add the following:
123
+
124
+
```YAML
125
+
redisRescore.redisUrl : "YourHostIP"
126
+
```
127
+
128
+
<br/>
129
+
<br/>
130
+
131
+
# Plugin Builder
45
132
46
133
## 1- First pull the git rep into your machine
47
134
<br/>
@@ -106,7 +193,5 @@ The `Port` will always be `6379` because that's the default `Port` for the **Red
106
193
To change the `Host`, you first need to go to the `config` folder in your **ElasticSearch** dir.
107
194
There open the `elasticsearch.yml` file, you want to add the following:
0 commit comments