We have a search in our website implemented using EPiServer Find. It has a sorting option such as 'Sort by number of views' which is based on a int property.
Strange thing is this sorting works for most of the times and occationally it fails with following Java ClassCastException error.
EPiServer.Find.ServiceException: 'The remote server returned an error: (503) Server Unavailable.ReduceSearchPhaseException[Failed to execute phase [query], [reduce] ]; nested: ClassCastException[java.lang.Double cannot be cast to java.lang.Long]; '
Anyyone has a clue why this server error occurs randomly?
Can you share line of codes which includes the creating of search query and declaration of that int property. That will be helpful to identify the problem.
Are you using a demo/developer find index?We have this issue from time to time that Episerver find servers are Unavailable, for our local environment where we are using developer index.Usually we open a ticket about it, but most of the case it will start to work again pretty quickly.
This was the issue and solved by applying the suggested workaround;