Can anyone identify this 'search syntax' or 'query language' ?
I am looking for a more complete specification.
- There is one operator:
=
- All strings are case-insensitive, limited to 7-bit
- Whitespace is significant
- Queries are of the form:
column=value
&
is a query seperator, leading to column1=value1&column2=value2
for an INTERSECTION
- Data typing is implicit, and has at least strings, booleans, and positive decimal values
- Positive decimal numbers have syntax similar to the following:
value=-10.0
returns all results with value less-than-or-equal to 10
value=10+
returns all results with value greater-than-or-equal to 10
value=1:10.0
returns all results between 1 and 10, inclusively
- Booleans:
- False can be represented as :
bool=0
,bool=f
,bool=false
- True can be represented as:
bool=0
, bool=t
,bool=true
- Strings:
- Do not need to be wrapped in quotes, quotes are ignored
?
is a single-character wildcard, *
is a multi-character (can be empty) wildcard
What I've looked at so far:
Lucene
, which uses :
for seperator, and is more complex syntatically
SQL where-clauses
which use far more extensive operators
HQL
and .QL
(and others from Wikipedia's query pages) - however, this is significantly less object based.
Given the complexity, including implicit type conversions, I don't believe this was a home-grown DSL.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…