[hibernate-issues] [JIRA] (HSEARCH-3839) Sorting by numeric value has an exception "(expected=NUMERIC). Use UninvertingReader or index with docvalues"

Waldemar Kłaczyński (JIRA) jira at hibernate.atlassian.net
Wed Feb 26 10:08:15 EST 2020


Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea ) *commented* on HSEARCH-3839 ( https://hibernate.atlassian.net/browse/HSEARCH-3839?atlOrigin=eyJpIjoiNGI2ODk2NGZiZGU4NDQ5OWFiZTc0ZDM5ZmUyODliMGYiLCJwIjoiaiJ9 )

Re: Sorting by numeric value has an exception "(expected=NUMERIC). Use UninvertingReader or index with docvalues" ( https://hibernate.atlassian.net/browse/HSEARCH-3839?atlOrigin=eyJpIjoiNGI2ODk2NGZiZGU4NDQ5OWFiZTc0ZDM5ZmUyODliMGYiLCJwIjoiaiJ9 )

Elasticsearch's has already solved this problem. It would be a shame not to use it. Many changes are necessary, but many can be accelerated by adopting their solutions. It's even better here because you can then ensure backward compatibility with Elasticsearch.

It tests it and the solution works. I can choose how to choose the value. There is a min and max search fix, Elasticsearch's was a bug in these functions when it comes to Storage.FLATTENED, I corrected that these functions would work the same as for Storage.NESTED. But the solution turns out to be effective and solves my problem.

This can be supplemented with the option of defining a comparator when using native LuceneSearch sort predicates. Extend native instructions with the ability to download a multi value comparator.

( https://hibernate.atlassian.net/browse/HSEARCH-3839#add-comment?atlOrigin=eyJpIjoiNGI2ODk2NGZiZGU4NDQ5OWFiZTc0ZDM5ZmUyODliMGYiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3839#add-comment?atlOrigin=eyJpIjoiNGI2ODk2NGZiZGU4NDQ5OWFiZTc0ZDM5ZmUyODliMGYiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:cefda43 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200226/e556b98c/attachment.html 


More information about the hibernate-issues mailing list