I am trying to query GeoServer with a CQL Filter using the IN clause.
If I send a request like this I get data back.
but if I send a url with strToLowerCase around state_name it will not work.
Is there anyway around this?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI am trying to query GeoServer with a CQL Filter using the IN clause.
If I send a request like this I get data back.
but if I send a url with strToLowerCase around state_name it will not work.
Is there anyway around this?
Looking at the logs, CQL does't accept IN
after strToLoweCase
Caused by: org.geotools.filter.text.cql2.CQLException: Encountered "in" at line 1, column 28. Was expecting one of:
<EOF>
"and" ...
"or" ...
";" ...
"*" ...
"/" ...
"+" ...
"-" ...
"not" ...
"like" ...
"ilike" ...
"exists" ...
"does-not-exist" ...
"is" ...
"between" ...
"=" ...
">" ...
"<" ...
">=" ...
"<=" ...
"<>" ...
Parsing : strToLowerCase(STATE_NAME) in ('texas','abc').
So you would have to use =
and or
strToLowerCase(STATE_NAME) = 'texas' or strToLowerCase(STATE_NAME) = 'florida'