You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Brendan Humphreys <br...@canva.com> on 2014/11/23 11:43:25 UTC

ClassCastException using elevations with cursorMark.

Hi Folks,

I'd like to switch to using cursorMark for pagination, but I can't get it
to work with elevations (Solr 4.10.2 / jdk7 / osx).

I try a query like:

q=foo&sort=score+desc,id+asc&elevateIds=1234567&cursorMark=*

and get an exception:

java.lang.ClassCastException: java.lang.Float cannot be cast to
org.apache.lucene.util.BytesRef
	at org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:1012)
	at org.apache.solr.schema.StrField.marshalSortValue(StrField.java:87)
	at org.apache.solr.search.CursorMark.getSerializedTotem(CursorMark.java:257)


full trace here:
https://gist.github.com/pandacalculus/e5cc8fef13e4b8372bd2

I get an identical exception when using static elevations (i.e.
elevate.xml) with cursorMark.

It appears the problem is in the calculation of the next cursorMark.

Has anyone encountered this?

Thanks,

-Brendan