[hibernate-issues] [JIRA] (HSEARCH-3909) Restore support for looking up the capabilities of each field in the metamodel

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Mon May 4 05:40:13 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *updated* an issue

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMDI4MDlmMmQ4NzU0NGNmZWIwNTEyOTU1ODY2YjRlZGIiLCJwIjoiaiJ9 ) / Task ( https://hibernate.atlassian.net/browse/HSEARCH-3909?atlOrigin=eyJpIjoiMDI4MDlmMmQ4NzU0NGNmZWIwNTEyOTU1ODY2YjRlZGIiLCJwIjoiaiJ9 ) HSEARCH-3909 ( https://hibernate.atlassian.net/browse/HSEARCH-3909?atlOrigin=eyJpIjoiMDI4MDlmMmQ4NzU0NGNmZWIwNTEyOTU1ODY2YjRlZGIiLCJwIjoiaiJ9 ) Restore support for looking up the capabilities of each field in the metamodel ( https://hibernate.atlassian.net/browse/HSEARCH-3909?atlOrigin=eyJpIjoiMDI4MDlmMmQ4NzU0NGNmZWIwNTEyOTU1ODY2YjRlZGIiLCJwIjoiaiJ9 )

Change By: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )

I.e. we need a way to know which predicates/sorts/projections/etc. are available for a given field. This will make it possible to implement something similar to jpamodelgen, where classes are generated at compile-time to represent the index metamodel and can be used in the Search DSL (something that's been [requested before|https://discourse.hibernate.org/t/hsearch-metamodel/3915]).

There was (limited) support for that in Search 5, through {{org.hibernate.search.metadata.FieldSettingsDescriptor#getType}}, {{org.hibernate.search.metadata.FieldSettingsDescriptor#getIndex}}, {{org.hibernate.search.metadata.FieldSettingsDescriptor#getStore}}.

An interesting way to implement this would be through a {{hasCapability(String)}} methods, where the string is the name of a given capability: match predicate, "within circle" predicate, "field value" sort, "distance" sort, ... Names would be exposed as constants in some {{BuiltinCapabilities}} class, and more importantly **each backend could define additional constants for its extended capabilities**. This would be very similar to what is described in HSEARCH-3633 for field configuration.

This ticket is a follow-up on HSEARCH-3589.

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

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#100125- sha1:927dd36 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200504/870d4664/attachment.html 


More information about the hibernate-issues mailing list