Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3507

Search query escaping is not accurate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.3
    • Component/s: JSPUI, XMLUI
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      5

      Description

      When a search string contains ":" at the end, the user gets a notification: "An error has occurred. Your query is invalid or the search engine is down." in the JSPUI and "Search produced no results." for XMLUI. This also occurs with this following Solr special characters: ^, \.

      • If a search ends in with a space followed by one of Solr's special characters (^, \,!, +, -,:, ||, &&) (e.g. "keyword3 :") the same notification as above is thrown, extended by the character + in the XMLUI.
      • The fix of DS-2602 escape every colon followed by space (e.g. "title: subtitle"), but it also changes the searching string which can be seen in the browser. The result is that the escaping characters will be escaped every time the request is sent. That leads by an even number of requests to the same notification as above.
      • The other special characters of SOLR produces one of the following notifications depending on the special character's position, whitespaces and correctness of brackets if used: "An error has occurred. Your query is invalid or the search engine is down." or "Search produced no results."

      As far as I understood we need to distinguish between the users and implement 2 different search views:

      1. A User that knows how Solr search work and wants to do field searches, where there is no need to escape Solr special characters. See DS-2699 and DS-2803
      2. A User that just copies a title, that may contain Solr special characters which must be escaped. The fix of DS-2602 with the usage of the Solr own escapeQueryChars would fit here. See DS-2461, DS-2339, DS-2472, DS-2602

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            haoueclf Marsa Haoua
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: