lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Dollar signs in field names
Date Mon, 27 Jul 2015 19:31:12 GMT
The problem has been that field naming conventions weren't
_ever_ defined strictly. It's not that anyone is taking away
the ability to use other characters,  rather it's codifying what's always
been true; Solr isn't guaranteed to play nice with naming
conventions other than those specified on the page you
referenced, alphanumerics and underscores and _not_ starting
with numerics.

The danger is that parsing the incoming URL can run into
"issues". Take for instance a colon. How would the parsing
process distinguish that from a field:value separator? Or a
hyphen when is that NOT and when is that part of a field
name? Periods are also interesting. You can specify some
params (e.g. facet params) with periods (f.field.prop=). No
guarantee has ever been made that a field _name_ with a
period won't confuse things. It happens to work, but that's
not by design, just like dollar signs.

So you can use dollar signs, but there won't be any attempts
to support it if some component somewhere doesn't "do the
right thing" with it. And no guarantee that there aren't current
corner cases where that causes problems. And if it does cause
problems, support won't be added.


On Mon, Jul 27, 2015 at 10:42 AM, Thomas Seidl <> wrote:
> Hi all,
> I've used dollar signs in field names for several years now, as an easy
> way to escape "bad" characters (like colons) coming in from the original
> source of the data, and I've never had any problems. Since I don't know
> of any Solr request parameters that use a dollar sign as a special
> character, I also wouldn't know where one might occur.
> But while I remember that the "supported" format for field names was
> previously completely undocumented (and it was basically "almost
> anything is supported, but some things might not work with some
> characters"), I now read that for about a year there has been a strict
> definition/recommendation in the Solr wiki [1] which doesn't allow for
> dollar signs.
> [1]
> So, my question is: Is this just for an easier definition, or is there a
> real danger of problems when using dollar signs in field names? Or,
> differently: How "bad" of an idea is it?
> Also, where was this definition discussed, why was this decision
> reached? Is there really an argument against dollar signs? I have to say
> it is really very handy to have a character available for field names
> that is usually not allowed in programming language's identifiers (as a
> cheap escape character).
> Thanks in advance,
> Thomas

View raw message