lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolas Tautenhahn <>
Subject Proper Escaping of Ampersands
Date Thu, 19 Aug 2010 15:33:59 GMT

I have a problem with, for example, company names like "AT&S".
A Job is sending data to the solr 1.4 (also tested it with 1.4.1) index
via python in XML, everything is escaped properly ("&" becomes "&amp;").

When I search for "at s"(q=%22at%20s%22), using the dismax handler, I
find the dataset to this company and I get all names back (The company
is still called at&s and not something like at&amp;s).

But when I search for q=at%26s (=at&s), I get nothing.
I also tried q=at%5C%26s (=at\&s) and q=at%5C%5C%26s blindly following
any clues for escaping with backslashes...

So, my question is: How do I search (correctly) for at&s?

When I use the "Analysis" Page in the admin panel and select my
fieldname and enter Field Value (Index) "AT&S" and enter the Field Value
(Query) as "AT&S" it shows me that the query matches - so I assume, SOLR
doesn't get the correct query string...

If it is necessary, I can supply information from schema.xml for the
fields in use, but as the "Analysis"-Page showed the match, I don't
think this is very useful...

best regards,
Nikolas Tautenhahn

View raw message