valeriansaliou / sonic

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.
https://crates.io/crates/sonic-server
Mozilla Public License 2.0
20.13k stars 578 forks source link

Search: LIMIT out of minimum/maximum bounds #288

Closed philiure closed 2 years ago

philiure commented 2 years ago

The limit I am setting for the query is throwing an error while in the config file I have query_limit_default = 1 and query_limit_maximum = 1400 and getting: sonic.client.SonicServerError: ERR policy_reject(LIMIT out of minimum/maximum bounds), is there a setting I am missing?

The reason why this limit is so high is to assess the retrieved with all relevant documents (and sometimes there's a lot of relevant results). I was also wondering what OFFSET does, I didn't see much documentation on it.

ghost commented 2 years ago

Your error is (probably) caused by query_limit_default=1, because numbers above 1400 work fine for me. And if I understand it right, offset is similar to pages.

philiure commented 2 years ago

I changed the limits as you indicated, but I still get the same error. What settings should I change to not get the error: 'LIMIT out of minimum/maximum bounds'? @valeriansaliou @Sly-Little-Fox

I don't see a clear min max setting otherwise.

Moreover, for a lot my evaluation queries (around 76%) Sonic does not return an ID but an empty array, does Sonic only perform an intersection (AND merge) of the results found for the given keyword in the query? I am assuming there is no ranking performed?