You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ronja Koistinen (JIRA)" <ji...@apache.org> on 2017/10/03 13:22:04 UTC

[jira] [Created] (SOLR-11432) Query Elevation breaks collection aliasing under certain conditions

Ronja Koistinen created SOLR-11432:
--------------------------------------

             Summary: Query Elevation breaks collection aliasing under certain conditions
                 Key: SOLR-11432
                 URL: https://issues.apache.org/jira/browse/SOLR-11432
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: search
    Affects Versions: 6.6.1
         Environment: SolrCloud 6.6.1, Centos 7
            Reporter: Ronja Koistinen


I have two collections: "intranet" and "mysite.tld". I created an alias for both of these: 
{code:none}
{"collection":{"all":"mysite.tld,intranet"}}
{code}

Both collections have query elevation enabled, with differing contents in {{elevate.xml}}.

When I search the "all" alias with any old query, it works fine:

{code:none}
$ curl -s 'http://192.168.11.10:8983/solr/all/select?q=something&wt=json&qf=content' | jq .response.numFound
20
{code}

When I search with a query which matches the {{elevate.xml}} in one of the collections but not both, I get this error:

{code:none}
$ curl -s 'http://192.168.11.10:8983/solr/all/select?q=tiedekunta&wt=json&qf=content' | jq .
{
  "responseHeader": {
    "zkConnected": true,
    "status": 500,
    "QTime": 28,
    "params": {
      "q": "tiedekunta",
      "qf": "content",
      "wt": "json"
    }
  },
  "error": {
    "trace": "java.lang.NullPointerException\n\tat org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1227)\n\tat org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:1075)\n\tat org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:775)\n\tat org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:754)\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:429)\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\n\tat org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat java.lang.Thread.run(Thread.java:748)\n",
    "code": 500
  }
}
{code}

If I add {{enableElevation=false}}, it works fine:

{code:none}
$ curl -s 'http://192.168.11.10:8983/solr/all/select?q=tiedekunta&wt=json&qf=content&enableElevation=false' | jq .response.numFound
170
{code}

Similarly, if I search for the same word in either of the collections themselves, it works fine:

{code:none}
$ curl -s 'http://192.168.11.10:8983/solr/intranet/select?q=tiedekunta&wt=json&qf=content' | jq .response.numFound
100
$ curl -s 'http://192.168.11.10:8983/solr/mysite.tld/select?q=tiedekunta&wt=json&qf=content' | jq .response.numFound
71
{code}

And finally, if I search the "all" alias for a word which is found in both collections' {{elevate.xml}}, it works fine:

{code:none}
$ curl -s 'http://192.168.11.10:8983/solr/all/select?q=avoin&wt=json&qf=content' | jq .
{
  "responseHeader": {
    "zkConnected": true,
    "status": 0,
    "QTime": 46,
    "params": {
      "q": "avoin",
      "qf": "content",
      "wt": "json"
    }
  },
  "response": {
    "numFound": 300,
    "start": 0,
    "maxScore": 5.8714366,
    "docs": [
      {
        "url": REDACTED,
        "contentLength": 62564,
        "mimetype": "text/html",
        "id": REDACTED,
        "[elevated]": true
      },
      {
        "url": REDACTED,
        "contentLength": 38354,
        "mimetype": "text/html",
        "id": REDACTED,
        "[elevated]": false
      },
 --SNIP--
{code}

To conclude: Query Elevation breaks collection aliasing (atleast in cloud mode) when the queried string is a hit in one of the aliased collections' {{elevate.xml}} but not all of them.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org