[ https://issues.apache.org/jira/browse/SOLR-5697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Kan updated SOLR-5697: ----------------------------- Description: The shard with the configuration illustrating the issue is attached. Since the size of the archive exceed the upload limit, I have dropped the solr.war from the webapps directory. Please add it (SOLR 4.3.1). Also attached is example query parser maven project. The binary has been already deployed onto lib directories of each core. Start the shard using startUp_multicore.sh. 1. curl 'http://localhost:8983/solr/metadata/update?commit=false&debugQuery=on' --data-binary '<delete><query>Title:this_title</query></delete>' -H "Content-type:text/xml" This query produces an exception: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">33</int></lst><lst name="error"><str name="msg">Unknown query parser 'lucene'</str><int name="code">400</int></lst> </response> 2. Change the multicore/metadata/solrconfig.xml and multicore/statements/solrconfig.xml by uncommenting the defType parameters on requestHandler name="/select". Issue the same query. Result is same: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">30</int></lst><lst name="error"><str name="msg">Unknown query parser 'lucene'</str><int name="code">400</int></lst> </response> 3. Keep the same config as in 2. and specify query parser in the local params: curl 'http://localhost:8983/solr/metadata/update?commit=false&debugQuery=on' --data-binary '<delete><query>{!qparser1}Title:this_title</query></delete>' -H "Content-type:text/xml" The result: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">3</int></lst><lst name="error"><str name="msg">no field name specified in query and no default specified via 'df' param</str><int name="code">400</int></lst> </response> The reason being because our query parser is "mis-behaving" in that it removes colons from the input queries => we get on the server side: Modified input query: Title:this_title ---> Titlethis_title 5593 [qtp2121668094-15] INFO org.apache.solr.update.processor.LogUpdateProcessor – [metadata] webapp=/solr path=/update params={debugQuery=on&commit=false} {} 0 31 5594 [qtp2121668094-15] ERROR org.apache.solr.core.SolrCore – org.apache.solr.common.SolrException: no field name specified in query and no default specified via 'df' param at org.apache.solr.parser.SolrQueryParserBase.checkNullField(SolrQueryParserBase.java:924) at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:944) at org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:765) at org.apache.solr.parser.QueryParser.Term(QueryParser.java:300) at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:186) at org.apache.solr.parser.QueryParser.Query(QueryParser.java:108) at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:97) at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:160) at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:72) at org.apache.solr.search.QParser.getQuery(QParser.java:142) at org.apache.solr.update.DirectUpdateHandler2.getQuery(DirectUpdateHandler2.java:319) at org.apache.solr.update.DirectUpdateHandler2.deleteByQuery(DirectUpdateHandler2.java:349) at org.apache.solr.update.processor.RunUpdateProcessor.processDelete(RunUpdateProcessorFactory.java:80) at org.apache.solr.update.processor.UpdateRequestProcessor.processDelete(UpdateRequestProcessor.java:55) at org.apache.solr.update.processor.DistributedUpdateProcessor.doDeleteByQuery(DistributedUpdateProcessor.java:931) at org.apache.solr.update.processor.DistributedUpdateProcessor.processDelete(DistributedUpdateProcessor.java:772) at org.apache.solr.update.processor.LogUpdateProcessor.processDelete(LogUpdateProcessorFactory.java:121) at org.apache.solr.handler.loader.XMLLoader.processDelete(XMLLoader.java:346) at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:277) at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173) at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1820) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:656) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:359) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:365) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:744) THE GENERAL PROBLEM (a guess): The default lucene parser not found => causing the above issues. was: The shard with the configuration illustrating the issue is attached. Since the size of the archive exceed the upload limit, I have dropped the solr.war from the webapps. Please add it (SOLR 4.3.1). Also attached is example query parser maven project. The binary has been already deployed onto lib directories of each core. Start the shard using startUp_multicore.sh. 1. curl 'http://localhost:8983/solr/metadata/update?commit=false&debugQuery=on' --data-binary '<delete><query>Title:this_title</query></delete>' -H "Content-type:text/xml" This query produces an exception: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">33</int></lst><lst name="error"><str name="msg">Unknown query parser 'lucene'</str><int name="code">400</int></lst> </response> 2. Change the multicore/metadata/solrconfig.xml and multicore/statements/solrconfig.xml by uncommenting the defType parameters on requestHandler name="/select". Issue the same query. Result is same: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">30</int></lst><lst name="error"><str name="msg">Unknown query parser 'lucene'</str><int name="code">400</int></lst> </response> 3. Keep the same config as in 2. and specify query parser in the local params: curl 'http://localhost:8983/solr/metadata/update?commit=false&debugQuery=on' --data-binary '<delete><query>{!qparser1}Title:this_title</query></delete>' -H "Content-type:text/xml" The result: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">3</int></lst><lst name="error"><str name="msg">no field name specified in query and no default specified via 'df' param</str><int name="code">400</int></lst> </response> The reason being because our query parser is "mis-behaving" in that it removes colons from the input queries => we get on the server side: Modified input query: Title:this_title ---> Titlethis_title 5593 [qtp2121668094-15] INFO org.apache.solr.update.processor.LogUpdateProcessor – [metadata] webapp=/solr path=/update params={debugQuery=on&commit=false} {} 0 31 5594 [qtp2121668094-15] ERROR org.apache.solr.core.SolrCore – org.apache.solr.common.SolrException: no field name specified in query and no default specified via 'df' param at org.apache.solr.parser.SolrQueryParserBase.checkNullField(SolrQueryParserBase.java:924) at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:944) at org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:765) at org.apache.solr.parser.QueryParser.Term(QueryParser.java:300) at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:186) at org.apache.solr.parser.QueryParser.Query(QueryParser.java:108) at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:97) at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:160) at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:72) at org.apache.solr.search.QParser.getQuery(QParser.java:142) at org.apache.solr.update.DirectUpdateHandler2.getQuery(DirectUpdateHandler2.java:319) at org.apache.solr.update.DirectUpdateHandler2.deleteByQuery(DirectUpdateHandler2.java:349) at org.apache.solr.update.processor.RunUpdateProcessor.processDelete(RunUpdateProcessorFactory.java:80) at org.apache.solr.update.processor.UpdateRequestProcessor.processDelete(UpdateRequestProcessor.java:55) at org.apache.solr.update.processor.DistributedUpdateProcessor.doDeleteByQuery(DistributedUpdateProcessor.java:931) at org.apache.solr.update.processor.DistributedUpdateProcessor.processDelete(DistributedUpdateProcessor.java:772) at org.apache.solr.update.processor.LogUpdateProcessor.processDelete(LogUpdateProcessorFactory.java:121) at org.apache.solr.handler.loader.XMLLoader.processDelete(XMLLoader.java:346) at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:277) at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173) at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1820) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:656) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:359) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:365) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:744) THE GENERAL PROBLEM (a guess): The default lucene parser not found => causing the above issues. > Delete by query does not work properly with customly configured query parser > ---------------------------------------------------------------------------- > > Key: SOLR-5697 > URL: https://issues.apache.org/jira/browse/SOLR-5697 > Project: Solr > Issue Type: Bug > Components: query parsers, update > Affects Versions: 4.3.1 > Reporter: Dmitry Kan > Attachments: query_parser_maven_project.tgz, shard.tgz > > > The shard with the configuration illustrating the issue is attached. Since > the size of the archive exceed the upload limit, I have dropped the solr.war > from the webapps directory. Please add it (SOLR 4.3.1). > Also attached is example query parser maven project. The binary has been > already deployed onto lib directories of each core. > Start the shard using startUp_multicore.sh. > 1. curl > 'http://localhost:8983/solr/metadata/update?commit=false&debugQuery=on' > --data-binary '<delete><query>Title:this_title</query></delete>' -H > "Content-type:text/xml" > This query produces an exception: > <?xml version="1.0" encoding="UTF-8"?> > <response> > <lst name="responseHeader"><int name="status">400</int><int > name="QTime">33</int></lst><lst name="error"><str name="msg">Unknown query > parser 'lucene'</str><int name="code">400</int></lst> > </response> > 2. Change the multicore/metadata/solrconfig.xml and > multicore/statements/solrconfig.xml by uncommenting the defType parameters on > requestHandler name="/select". > Issue the same query. Result is same: > <?xml version="1.0" encoding="UTF-8"?> > <response> > <lst name="responseHeader"><int name="status">400</int><int > name="QTime">30</int></lst><lst name="error"><str name="msg">Unknown query > parser 'lucene'</str><int name="code">400</int></lst> > </response> > 3. Keep the same config as in 2. and specify query parser in the local params: > curl 'http://localhost:8983/solr/metadata/update?commit=false&debugQuery=on' > --data-binary '<delete><query>{!qparser1}Title:this_title</query></delete>' > -H "Content-type:text/xml" > The result: > <?xml version="1.0" encoding="UTF-8"?> > <response> > <lst name="responseHeader"><int name="status">400</int><int > name="QTime">3</int></lst><lst name="error"><str name="msg">no field name > specified in query and no default specified via 'df' param</str><int > name="code">400</int></lst> > </response> > The reason being because our query parser is "mis-behaving" in that it > removes colons from the input queries => we get on the server side: > Modified input query: Title:this_title ---> Titlethis_title > 5593 [qtp2121668094-15] INFO > org.apache.solr.update.processor.LogUpdateProcessor – [metadata] > webapp=/solr path=/update params={debugQuery=on&commit=false} {} 0 31 > 5594 [qtp2121668094-15] ERROR org.apache.solr.core.SolrCore – > org.apache.solr.common.SolrException: no field name specified in query and no > default specified via 'df' param > at > org.apache.solr.parser.SolrQueryParserBase.checkNullField(SolrQueryParserBase.java:924) > at > org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:944) > at > org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:765) > at org.apache.solr.parser.QueryParser.Term(QueryParser.java:300) > at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:186) > at org.apache.solr.parser.QueryParser.Query(QueryParser.java:108) > at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:97) > at > org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:160) > at > org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:72) > at org.apache.solr.search.QParser.getQuery(QParser.java:142) > at > org.apache.solr.update.DirectUpdateHandler2.getQuery(DirectUpdateHandler2.java:319) > at > org.apache.solr.update.DirectUpdateHandler2.deleteByQuery(DirectUpdateHandler2.java:349) > at > org.apache.solr.update.processor.RunUpdateProcessor.processDelete(RunUpdateProcessorFactory.java:80) > at > org.apache.solr.update.processor.UpdateRequestProcessor.processDelete(UpdateRequestProcessor.java:55) > at > org.apache.solr.update.processor.DistributedUpdateProcessor.doDeleteByQuery(DistributedUpdateProcessor.java:931) > at > org.apache.solr.update.processor.DistributedUpdateProcessor.processDelete(DistributedUpdateProcessor.java:772) > at > org.apache.solr.update.processor.LogUpdateProcessor.processDelete(LogUpdateProcessorFactory.java:121) > at > org.apache.solr.handler.loader.XMLLoader.processDelete(XMLLoader.java:346) > at > org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:277) > at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173) > at > org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92) > at > org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1820) > at > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:656) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:359) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) > at org.eclipse.jetty.server.Server.handle(Server.java:365) > at > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) > at > org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) > at > org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) > at > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) > at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) > at > org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) > at > org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) > at java.lang.Thread.run(Thread.java:744) > THE GENERAL PROBLEM (a guess): The default lucene parser not found => causing > the above issues. -- This message was sent by Atlassian JIRA (v6.1.5#6160) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org