New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to search for literal '(' using portal_catalog or @@search? #1537
Comments
@idgserpro have you tried to escape them? i.e |
Yeah, create a https://github.com/collective/minimalplone4 installation. Add a Document called
Don't know if this is a Plone or ZCTextIndex limitation. |
@idgserpro what version of Plone are you using? I just tested something similar in Plone 5.0.4 and it's working: |
Indeed, my bad, I didn't said which Plone version we're using: we're at 4.3.x. We'll test with 5.0.x. |
@hvelarde Actually, this is not a good test. You've found the document not because of "(" in the beginning of the string, but because of "Plone" string itself (since searching for "(" is ignored). Searching only for "(": Searching for "(Plone" And searching just for "P", a single string search (to show that the problem is not the size of the string itself, but with ignored characterts): And, to test what @gforcada suggested, but now in Plone 5: |
This is a limitation of the index implementation. You may want to open an issue at https://github.com/zopefoundation/Products.ZCTextIndex and ask over there for details if you think this is a problem. |
@hvelarde a little bit late, but it worked in Plone 5 because of this https://github.com/plone/Products.CMFPlone/blob/5.1b4/Products/CMFPlone/browser/search.py#L28 |
Don't know if this is already solved in Plone 5 (we're using 4.3x) or if there's a limitation in how catalog works in this specific situation.
We have some Document objects in ZODB that have "Title - (Word)" and we need to be able to search for literal '(' in our queries. When trying to use portal_catalog, we get
Some solutions on the internet says to quote the search, if possible using the same functions already available in some scripts of Plone in skins folder, but they don't answer how to search, literally, for '(' or ')' (we may have other symbols that have this problems).
Is it possible or do we have a limitation in the catalog? Is there a third-party package (AdvancedQuery comes to mind) that provides this functionality?
The text was updated successfully, but these errors were encountered: