You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2014/05/12 16:48:15 UTC

[jira] [Commented] (SOLR-6061) Exception when sorting on a date field when using cursorMark parameter.

    [ https://issues.apache.org/jira/browse/SOLR-6061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13995125#comment-13995125 ] 

Steve Rowe commented on SOLR-6061:
----------------------------------

Hi Ramon,

Please give the field and fieldType definitions for your {{createdAt}} and {{id}} fields.

There's something strange happening here: your stack trace shows that {{StrField}}'s unmarshalling code is being used, rather than {{TrieDateField}}'s.  Did you change your schema without re-indexing?

It's not clear from the stack trace that it's the {{createdAt}} field that's causing trouble - can you try to run the all-docs {{cursorMark}} queries without {{createdAt}}, i.e. with just the {{id}} field?


> Exception when sorting on a date field when using cursorMark parameter.
> -----------------------------------------------------------------------
>
>                 Key: SOLR-6061
>                 URL: https://issues.apache.org/jira/browse/SOLR-6061
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.8
>            Reporter: Ramon Salla
>              Labels: cursorMark,, datefield
>
> I get the next exception when using new cursorMark pagination search and sorting using a date field (in this case I'm using a TrieDate).
> {code}
> "error": {
>     "msg": "java.lang.Long cannot be cast to java.lang.String",
>     "trace": "java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String\n\tat org.apache.solr.schema.FieldType.unmarshalStringSortValue(FieldType.java:993)\n\tat org.apache.solr.schema.StrField.unmarshalSortValue(StrField.java:92)\n\tat org.apache.solr.search.CursorMark.parseSerializedTotem(CursorMark.java:232)\n\tat org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:158)\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:1952)\n\tat org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)\n\tat org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)\n\tat org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)\n\tat org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)\n\tat org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat java.lang.Thread.run(Thread.java:745)\n",
>     "code": 500
>   }
> {code}
> The query is like this:
> {code}
> select?q=*%3A*&cursorMark=AoI%2FITAwNjZmNzA1N2UzZTVjZWY2NDQyMGY5NmY2ZDQ2ZDE0ZGUwODJiMTVkZTBmZWI3ZTk5NGNkZjZmNWViMDEzZDJ4v%2BDu%2Br0C&rows=10&sort=createdAt+asc%2Cid+asc
> {code}
> Related Issue could be:
> https://issues.apache.org/jira/browse/SOLR-5920



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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