lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tedsolr <>
Subject Exact match on string field with special characters
Date Wed, 01 Oct 2014 21:32:55 GMT
I am trying to do SQL like aggregation (GROUP BY) with solr faceting. So I
use string fields for faceting - to try to get an exact match. However, it
seems like to run a facet query I have to surround the value with double
quotes. That poses issues when the field value is

green "bath" towels


red \cars

Those two special characters must be transformed somehow on indexing so I
can create the query:
String fg = fieldName + ":\"" + fieldValue + "\"";

Is there a way to request an exact match search without having to resort to
the quotes? I could possibly convert spaces to underscores at index time,
but I'd like to avoid munging that data because I'm using the string field
for display too! That saves time/searches when aggregating against 10 - 15
fields which takes a whole lot of facet searches to begin with.

Using Solr 4.9 

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message