When using words like and or or in a query to the @querystring-search endpoint that searches in the SearchableText index, the endpoint breaks because of some ZCTextIndex error and returns a HTTP 500.
This is the traceback in Plone:
2022-07-07 15:25:55,862 ERROR [Zope.SiteErrorLog:22][waitress-2] ParseError: http://localhost:3000/en/global-search/@querystring-search
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 371, in publish_module
Module ZPublisher.WSGIPublisher, line 266, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module plone.rest.service, line 22, in __call__
Module plone.restapi.services, line 19, in render
Module plone.restapi.services.querystringsearch.get, line 56, in reply
Module plone.app.querystring.querybuilder, line 89, in __call__
Module plone.app.querystring.querybuilder, line 170, in _makequery
Module Products.CMFPlone.CatalogTool, line 468, in searchResults
Module Products.ZCatalog.ZCatalog, line 625, in searchResults
Module Products.ZCatalog.Catalog, line 1091, in searchResults
Module Products.ZCatalog.Catalog, line 634, in search
Module Products.ZCatalog.Catalog, line 564, in _search_index
Module Products.ZCTextIndex.ZCTextIndex, line 209, in query_index
Module Products.ZCTextIndex.QueryParser, line 153, in parseQuery
Module Products.ZCTextIndex.QueryParser, line 193, in _parseOrExpr
Module Products.ZCTextIndex.QueryParser, line 211, in _parseAndExpr
Module Products.ZCTextIndex.QueryParser, line 233, in _parseNotExpr
Module Products.ZCTextIndex.QueryParser, line 241, in _parseTerm
Module Products.ZCTextIndex.QueryParser, line 260, in _parseAtom
Module Products.ZCTextIndex.QueryParser, line 188, in _get
Module Products.ZCTextIndex.QueryParser, line 174, in _require
Products.ZCTextIndex.ParseTree.ParseError: Token <Token:ATOM> required, 'and' found
When using words like and or or in a query to the @querystring-search endpoint that searches in the SearchableText index, the endpoint breaks because of some ZCTextIndex error and returns a HTTP 500.
This is the traceback in Plone:
This is in Plone 5.2.