lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: Proper Escaping of Ampersands
Date Fri, 20 Aug 2010 14:57:12 GMT
On Thu, Aug 19, 2010 at 11:33 AM, Nikolas Tautenhahn
<> wrote:
> Hi,
> 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.

That's the correct encoding if you're typing it directly into a
browser address box.

But you should be able to verify that solr is getting the correct
query string by checking out "params" in the response (in the example
server, by default they are echoed back).  And adding debugQuery=true
to the request should show you exactly what query is being generated.

But the real issue likely lies with your fieldType definition.  Can
you show that?


View raw message