Welshhokkers
06/17/2024, 1:20 PM{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "popularity",
"optional": true,
"sort": true,
"stem": false,
"type": "int32"
}
And a rule set up to count click events:
{
"name": "page_popularity",
"params": {
"destination": {
"collection": "page",
"counter_field": "popularity"
},
"limit": 1000,
"source": {
"collections": [
"page"
],
"events": [
{
"name": "page_click_event",
"type": "click",
"weight": 1
}
]
}
},
"type": "counter"
}
I can trigger a click event using:
"name": "page_click_event",
"type": "click",
"data": {
"q": "searching",
"doc_id": "page_1451",
"user_id": "***.***.**.**"
}
}
And I get a response:
"{\"ok\": true"
However, when querying the collection, I am not getting a popularity field and the counter does not seem to be adding anything to that document field.
Can anyone see what I might be missing here? Using typesense 26.0.
Thanks.