Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-9457

[Solr query] A query starting with a bracket is not well interpreted by the Solr parser

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.0
    • 4.2.0
    • None
    • None
    • 4.2 M9, 4.2 M10

      Sometimes, we sent Solr queries without adding informations to the requests (like ACL or content type) like for extractions.
      In this case, if we have a request starting with a join queries and having other part in the queries separated by a logical operator (AND/OR), Solr fails while parsing the logical operator :

      org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8984/solr: org.apache.solr.search.SyntaxError: Cannot parse ' AND myMetadata:value': Encountered " <AND> "AND "" at line 1, column 1.

      Example of failing requests :

      {!ametys join=type q="label_s:MyLabel"} AND myMetadata:value

            bmaurel Bérénice Maurel
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: