[
https://issues.apache.org/jira/browse/SOLR-11921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790749#comment-16790749
]
Monica Marrero commented on SOLR-11921:
---------------------------------------
I have the same problem: when cursorMark is used together with elevation an
error is thrown if we want to force the elevated documents to appear first.
I reproduced the error with Solr 7.7 and the techproducts collection. This is
what happens:
Request1:
[http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&fl=id,[elevated],score&rows=2&sort=id%20asc&cursorMark=*]
Result1: Works fine but the document is not boosted to the first results (we
are ordering just by id)
Request2:
[http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&fl=id,[elevated],score&rows=2&*sort=id%20asc&forceElevation=true*&cursorMark=*]
Result2: Error: java.lang.Integer cannot be cast to
org.apache.lucene.util.BytesRef"
Request3:
[http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&fl=id,[elevated],score&cursorMark=*&rows=2&*sort=score%20desc,%20id%20asc*]
Result3: Error:java.lang.Float cannot be cast to org.apache.lucene.util.BytesRef
> cursorMark with elevateIds throws Exception
> -------------------------------------------
>
> Key: SOLR-11921
> URL: https://issues.apache.org/jira/browse/SOLR-11921
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SearchComponents - other
> Affects Versions: 7.2
> Reporter: Greg Roodt
> Priority: Critical
>
> When cursorMark pagination is used together with elevateIds, an exception is
> thrown.
>
> Steps to reproduce described below.
>
> 1. Start solr with the `demo` core
> {{docker run --name solr_cursor_elevate -d -p 8983:8983 solr:7.2 solr-demo}}
>
> 2. Add some test documents
> {{curl http://localhost:8983/solr/demo/update?commit=true -d '}}
> {{[}}
> {{ {"id" : "book1",}}
> {{ "title_t" : "book one"}}
> {{ },}}
> {{ {"id" : "book2",}}
> {{ "title_t" : "book two"}}
> {{ },}}
> {{ {"id" : "book3",}}
> {{ "title_t" : "book three"}}
> {{ }}}
> {{]'}}
>
> 3. Execute a query with cursorMark and elevateIds
> curl
> '[http://localhost:8983/solr/demo/elevate?cursorMark=*&elevateIds=book3&enableElevation=true&df=title_t&fl=id,title_t&forceElevation=true&q=book&rows=2&sort=id%20asc'|http://localhost:8983/solr/demo/elevate?cursorMark=*&elevateIds=book3&enableElevation=true&df=title_t&fl=id,title_t&forceElevation=true&q=book&rows=2&sort=id%20asc%27]
>
> Observe the stacktrace:
> null:java.lang.ClassCastException: java.lang.Integer cannot be cast to
> org.apache.lucene.util.BytesRef
> at
> org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:1127)
> at org.apache.solr.schema.StrField.marshalSortValue(StrField.java:100)
> at
> org.apache.solr.search.CursorMark.getSerializedTotem(CursorMark.java:250)
> at
> org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1445)
> at
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:375)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2503)
> at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:710)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
> 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:283)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
> 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)
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]