Spring Data Solr: Queries with "AND", "NOT" and "OR" not escaped or handled

Viewed 570

We are using spring-data-solr, mainly using exact match/equals filter queries.

We have found that the values NOT, OR, and AND can be supplied, which are passed directly onto solr (without any pre-processing). This causes solr to error. For example, building a Criteria object like

Criteria.where("fuelType").is("AND")

Results in the following solr query

fq=fuelType:AND

We have found that if we call Solr directly with

fq=fuelType:"AND"

This would be fine, however, I can see that quotes are only added when there is whitespace in the value.

Is there something I am missing?

I still want to use the Standard Solr query parser if possible

1 Answers
Related