Hello, recently I have changed the way I get facet data from Solr. I was using GET method on request but due to the limit of the query I changed to POST method.
Bellow is a sample of the data I send to Solr, in order to get facets. But there is something here that I donĀ“t understand. If I do not tag the fq query, it woks fine: {'q':'*:*', 'fl': '*', 'fq':'city_colaboration:"College Station"', 'json.facet': '{city_colaboration:{type:terms, field: city_colaboration ,limit:5000}}'} If I tag the fq query and I query for a simple word it works fine too. But if query a multi word with space in the middle it breaks: {'q':'*:*', 'fl': '*', 'fq':'{!tag=city_colaboration_tag}city_colaboration:"College Station"', 'json.facet': '{city_colaboration:{type:terms, field: city_colaboration ,limit:5000, domain:{excludeTags:city_ colaboration_tag}}}'} All of this works fine for GET method, but breks on POST method. Below is the portion of the log. I really appreciate your help. Regards, Koji 01:49 ERROR true RequestHandlerBase org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Cannot parse 'city_colaboration:"College': Lexical error at line 1,​ column 34. Encountered: <EOF> after : "\"College" org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Cannot parse 'cidade_colaboracao_exact:"College': Lexical error at line 1, column 34. Encountered: <EOF> after : "\"College" at org.apache.solr.handler.component.QueryComponent. prepare(QueryComponent.java:219) at org.apache.solr.handler.component.SearchHandler.handleRequestBody( SearchHandler.java:270) at org.apache.solr.handler.RequestHandlerBase.handleRequest( RequestHandlerBase.java:173) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529) at org.apache.solr.servlet.SolrDispatchFilter.doFilter( SolrDispatchFilter.java:361) at org.apache.solr.servlet.SolrDispatchFilter.doFilter( SolrDispatchFilter.java:305) at org.eclipse.jetty.servlet.ServletHandler$CachedChain. doFilter(ServletHandler.java:1691) at org.eclipse.jetty.servlet.ServletHandler.doHandle( ServletHandler.java:582) at org.eclipse.jetty.server.handler.ScopedHandler.handle( ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle( SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler. doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler. doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) at org.eclipse.jetty.server.session.SessionHandler. doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler. doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle( ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle( ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerCollection. handle(HandlerCollection.java:119) at org.eclipse.jetty.server.handler.HandlerWrapper.handle( HandlerWrapper.java:134) at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle( RewriteHandler.java:335) at org.eclipse.jetty.server.handler.HandlerWrapper.handle( HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:534) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) at org.eclipse.jetty.server.HttpConnection.onFillable( HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded( AbstractConnection.java:273) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run( SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume. executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume. produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run( ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run( QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:748)