Skip to content
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

G-REG search does not work with special characters #905

Open
saranki opened this issue Jun 11, 2020 · 0 comments
Open

G-REG search does not work with special characters #905

saranki opened this issue Jun 11, 2020 · 0 comments

Comments

@saranki
Copy link

saranki commented Jun 11, 2020

Description:
Some searches do not work with special characters like "/", ")".
An example is the File artifact has value M/M_M) in the Notes fields. Perform a search on value M/M_M) from the File search menu - no matches. If you use quotes around the search value it works like "M/M_M)"

Affected Product Version:
wso2greg-5.3.0

Steps to reproduce:

  1. Created a file in the Publisher
  2. Added note with special characters, Test-M/M_M).
  3. When we searched for M/M_M) and Test-M/M_M) we didn't get any output.
    Furthermore, we also got the following error message in the wso2carbon.log file.
[2020-06-01 20:19:48,898] ERROR {org.wso2.carbon.registry.indexing.service.ContentBasedSearchService} -  Invalid Search Query, query contains invalid characters
org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Cannot parse 'overview_name_s:*m/m_m)* OR *m/m_m)*': Encountered " ")" ") "" at line 1, column 22.
Was expecting one of:
    <EOF> 
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <LPARAMS> ...
    <NUMBER> ...
.
.
.
Caused by: org.apache.solr.search.SyntaxError: Cannot parse 'overview_name_s:*m/m_m)* OR *m/m_m)*': Encountered " ")" ") "" at line 1, column 22.
Was expecting one of:
    <EOF> 
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <LPARAMS> ...
    <NUMBER> ...
    
	at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:155)
	at org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50)
	at org.apache.solr.search.QParser.getQuery(QParser.java:141)
	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:203)
	... 114 more
Caused by: org.apache.solr.parser.ParseException: Encountered " ")" ") "" at line 1, column 22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant