You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a page with parenthesis enclosed text as a title
Try to search that page using quoted query
What I expect to happen:
The search searches the page
What actually happened:
The search does not find the page
When accessing through REST API (because plone.app.querystring uses the munge_search_term function here), we get an error because the query is transformed to an unknown string for ZCatalog
What version of Plone/ Addons I am using:
Plone 6
The text was updated successfully, but these errors were encountered:
Let me check.
I have created a Plone 6.0 site with two pages, one with title "Hello World Plain" and one with "Hello (World) Parentheses".
In the SearchableText and Title indexes, the parentheses are stripped away, so they only have ['hello', 'world', 'parentheses'] or similar.
Search for hello world:
munge_search_term gives hello AND world*
This finds both.
Search for "hello world", so in quotes:
munge_search_term gives hello world"
This finds both.
Search for hello (world):
munge_search_term gives hello AND "("world")"*
This finds both.
Search for "hello (world)", so in quotes:
munge_search_term gives "hello "("world")"", which looks wrong.
This finds nothing.
Now I try it with your branch. There is no change, except in the last one, where munge_search_term correctly gives "hello (world)", and we find both pages.
So looks good to me. Thanks!
Same for your plone.app.querystring PR.
I wonder if we could instead simply add the parentheses to BAD_CHARS, as they are ignored anyway, but they are not exactly "bad" characters, just a bit annoying. ;-). So let's leave that as it is.
BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
What I did:
What I expect to happen:
What actually happened:
munge_search_term
function here), we get an error because the query is transformed to an unknown string for ZCatalogWhat version of Plone/ Addons I am using:
The text was updated successfully, but these errors were encountered: