Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1250

Seach the words having ampersand (&) symbol

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.3
    • 1.3
    • search
    • None
    • Linux

    Description

      I am indexing titles in my index.My titles can also have special characters like (+ - && || ! ( ) { } [ ] ^ " ~ * ? : )

      When i am querieing the index to search with the matching titles , I am using the escape sequence '\'
      as per the doc http://lucene.apache.org/java/2_3_2/queryparsersyntax.html

      It looks fine for most the case except for when the title consists of the character '&' or '&&'

      The query I used to search the index is as below in normal cases...

      http://myurl/solr/mdrs/select/?q=title:someTitle

      How do I search my index to get the titles like "jakarta & apache"

      I tried by giving the below query

      http://myurl/solr/mdrs/select/?q=title:jakarta & apache

      http://myurl/solr/mdrs/select/?q=title:"jakarta & apache"

      http://myurl/solr/mdrs/select/?q=title:jakarta \& apache

      http://myurl/solr/mdrs/select/?q=title:"jakarta \& apache"

      Each of the above queries are giving errors... Unable to search my title "jakarta & apache"

      Please let me know how can i search the words having ampersand (&) character

      Attachments

        Activity

          People

            Unassigned Unassigned
            secpath Secpath
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified