Open benoit74 opened 1 month ago
The problem here is that the search text is interpreted as a Xapian query where or
is an operator, and therefore the query is syntactically invalid. Note that if you search for "composition or rose" (without quotes) it will be interpreted as a query for either composition or rose rather than a query for all of composition, or and rose.
There are different ways to address this issue:
+
). The backend and the semantics of the q
parameter of the /catalog/v2/entries
API endpoint remain unchanged (thus it will be possible to pass advanced Xapian queries via the HTTP API).q
parameter of the /catalog/v2/entries
API endpoint and parse it respectively in the backend. The content of the searchbox is passed to the endpoint as is (like in the current implementation).@kelson42 @rgaudin ping
This issue remember me of https://github.com/kiwix/kiwix-tools/issues/440, I need to make a reassessment of all of this.
@veloman-yunkan Solution (1) - so a kind of xapian_escaping() should be implemented, but this should be done IMHO:
For Kiwix serve, not sure exactly how it should be done... but I guess this problem is potentialy everywhere
See e.g. https://library.kiwix.org/catalog/v2/entries?start=0&count=4&lang=fra&category=other&q=Or