I'm implementing an SQL-like query parser which outputs Solr query. I know Solr/Lucene query is not entirely same as boolean query, like there are MUST/MUST NOT/SHOULD. But I have to parse SQL-like boolean query automatically because the interface of our customers is already adopts SQL-like one.
Simple parsing like "A and B" -> "A and B" is OK, but such as "NOT(A and (B or C)) AND D", I'm at a loss when SolrServer returns a value which I didn't intend.
I read the following
http://lucene.472066.n3.nabble.com/Unexpected-boolean-query-behavior-td487306.html
but it seems to be of Lucene and I couldn't make out how to connect lucene BooleanQuery to Solr. Does anyone have good idea?