Limit/order/offset do not work on string/string [] facets search
militsa-tsvetkova opened this issue · 2 comments
militsa-tsvetkova commented
Describe the bug
Limit/order/offset do not work on string/string [] facets search
To Reproduce
exemplary schema for data
status: 'string',
applicability: 'string[]',
Expected behavior
Expect results to be sorted when passing order to faceted search but they are not - assume they are sorted by relevance, but not always
Exemplary payload
{ "facets": { "applicability": { "order": "DESC" }, "status": { "order": "DESC" } }, "preflight": true }
Exemplary response
{
"elapsed": {
"raw": 8976344,
"formatted": "8ms"
},
"hits": [],
"count": 2551,
"facets": {
"applicability": {
"count": 6,
"values": {
"O..": 23,
"F..": 64,
"C...": 116,
"A..": 35,
"I...": 36,
"D....": 11
}
},
"status": {
"count": 4,
"values": {
"C....": 2480,
"F....": 66,
"E....": 3,
"": 2
}
}
}
}
Environment Info
Orama: 2.0.20
Node: 18.17.0
Affected areas
Search
Additional context
No response
militsa-tsvetkova commented
A correction to the reported issues - sort does work on String Fields but not on array of strings. Any plans to extend it soon?
allevo commented
Can you describe the issue better?
Which dataset do you have? Can you share a minimal, reproducible Example?
I'm closing this PR, but feel free to open it again with more details.