Hello, These are special characters, if you don't need them, you must escape them.
See top of the article: https://lucene.apache.org/solr/guide/8_5/the-extended-dismax-query-parser.html Markus -----Original message----- > From:Webster Homer <webster.ho...@milliporesigma.com> > Sent: Friday 12th June 2020 22:09 > To: solr-user@lucene.apache.org > Subject: eDismax query syntax question > > Recently we found strange behavior in a query. We use eDismax as the query > parser. > > This is the query term: > 1,3-DIMETHYL-5-(3-PHENYL-ALLYLIDENE)-PYRIMIDINE-2,4,6-TRIONE > > It should hit one document in our index. It does not. However, if you use the > Dismax query parser it does match the record. > > The problem seems to involve the parenthesis and the dashes. If you escape > the dash after the parenthesis it matches > 1,3-DIMETHYL-5-(3-PHENYL-ALLYLIDENE)\-PYRIMIDINE-2,4,6-TRIONE > > I thought that eDismax and Dismax escaped all lucene special characters > before passing the query to lucene. Although I also remember reading that + > and - can have special significance in a query if preceded with white space. > I can find very little documentation on either query parser in how they work. > > Is this expected behavior or is this a bug? If expected, where can I find > documentation? > > > > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. If you are not the intended recipient, > you must not copy this message or attachment or disclose the contents to any > other person. If you have received this transmission in error, please notify > the sender immediately and delete the message and any attachment from your > system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not > accept liability for any omissions or errors in this message which may arise > as a result of E-Mail-transmission or for damages resulting from any > unauthorized changes of the content of this message and any attachment > thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not > guarantee that this message is free of viruses and does not accept liability > for any damages caused by any virus transmitted therewith. > > > > Click http://www.merckgroup.com/disclaimer to access the German, French, > Spanish and Portuguese versions of this disclaimer. >