[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
Sun Feb 23 19:37:35 EST 2020


Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea ) *created* an issue

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

Issue Type: Bug Affects Versions: 5.11.5.Final Assignee: Unassigned Components: engine Created: 23/Feb/2020 16:37 PM Environment: WildFly Application Server 18.1 Priority: Major Reporter: Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea )

If I use a field definition where the value is of type "Double". When I try to sort through this field, I get the "(expected=NUMERIC). Use UninvertingReader or index with docvalues" exception.

 {{ @Indexed
public class Assortment
@Id
@DocumentId
@Column(name = "Id", length = 128)
private String id;
........
@OneToMany(mappedBy = "assortment", orphanRemoval = true, fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@IndexedEmbedded(includeEmbeddedObjectId = true)
private List<AssortmentPrice> prices = new ArrayList<>();
.......
}

public class AssortmentPrice implements Serializable

{ @Id @DocumentId @Column(name = "Id", length = 128) private String id; ......... @Column(name = "BruttoPrice") @SortableField(forField = "bruttoPrice_sort") @NumericField(forField = "bruttoPrice_sort", precisionStep = 2) @Field(name = "bruttoPrice_sort", analyze = Analyze.NO) private Double bruttoPrice; ....... }

Sort sort = new Sort(new SortField("prices.bruttoPrice_sort", SortField.Type.DOUBLE));
fullTextQuery.setSort(sort);

 }} 

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

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:96a3924 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200224/b99f2809/attachment.html 


More information about the hibernate-issues mailing list