Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9165

Problems with the spellcheck component running search with cursor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.5.2, 5.6, 6.0.2, 6.1
    • Component/s: spellchecker
    • Labels:
      None

      Description

      I'm having some problems with the spellcheck component, specifically, running a search with cursors.

      When I run the following query:

      http://192.1.1.13:8983/solr/docs/search?q=insendio&shards.qt=/search&shards=192.1.1.14:8983/solr/docs,192.1.1.15:8983/solr/docs&fl=id&spellcheck=true&sort=score desc,id asc

      the following collations are returned
      <lst name="collations">
      <lst name="collation">
      <str name="collationQuery">incendio</str>
      <int name="hits">485</int>
      <lst name="misspellingsAndCorrections">
      <str name="insendio">incendio</str>
      </lst>
      </lst>
      </lst>

      Instead, when I try to run the same query but this time using cursors

      http://192.1.1.13:8983/solr/docs/search?q=insendio&shards.qt=/search&shards=192.1.1.14:8983/solr/docs,192.1.1.15:8983/solr/docs&fl=id&spellcheck=true&sort=score desc,id asc&cursorMark=*

      no collations are returned

      <bool name="correctlySpelled">false</bool><lst name="collations"/>

      and the server trace the following exception message.

      WARN - 2016-05-26 14:14:58.472; [docs shard2 core_node4 docs_shard2_replica1] org.apache.solr.spelling.SpellCheckCollator; Exception trying to re-query to check if a spell check possibility would return any hits.
      org.apache.solr.common.SolrException: Cursor functionality requires a sort containing a uniqueKey field tie breaker
      at org.apache.solr.search.CursorMark.<init>(CursorMark.java:93)
      at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:189)
      at org.apache.solr.spelling.SpellCheckCollator.collate(SpellCheckCollator.java:141)
      at org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(SpellCheckComponent.java:237)
      at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:202)
      at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:255)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064)
      at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:654)
      at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:450)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      at org.eclipseInstead.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:497)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

        1. SOLR-9165.patch
          3 kB
          James Dyer
        2. SOLR-9165.patch
          2 kB
          James Dyer

          Activity

            People

            • Assignee:
              jdyer James Dyer
              Reporter:
              yami.veranes Yamileydis Veranes
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: