lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <>
Subject Field name syntax for Lucene Expressions
Date Mon, 29 Feb 2016 17:26:26 GMT
Looking at the source code, it seeks as if only a limited syntax is
supported for field names (VARIABLE in the code) within Lucene Expressions
that corresponds to a subset of what Java/JavaScript/ECMAScript support
(ID: [_$a-zA-Z] [_$a-zA-Z0-9]*, plus a dotted list of IDs), and certainly
much less than the anything-goes model that Lucene and Solr currently
support. Is this really the case? If so, there should be a clear statement
in the Javadoc concerning this limitation.

The package Javadoc currrently only says "Arbitrary external variables -
see Bindings", but Bindings adds no significant info on the matter or
variable/field-name syntax. Especailly the common case of hyphen in field


I didn't see any mechanism for escaping or quoting non-Java field names to
work around this limitation. A simple hack workaround would be to add a
builtin function that takes a field name as a string and then executes the
same code as for a VARIABLE binding.

-- Jack Krupansky

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message