Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiYjcyMTlm...
) / New Feature (
https://hibernate.atlassian.net/browse/HSEARCH-4294?atlOrigin=eyJpIjoiYjc...
) HSEARCH-4294 (
https://hibernate.atlassian.net/browse/HSEARCH-4294?atlOrigin=eyJpIjoiYjc...
) Targeting of "implicit" fields in the Search DSL (
https://hibernate.atlassian.net/browse/HSEARCH-4294?atlOrigin=eyJpIjoiYjc...
)
Change By: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Elasticsearch creates some implicit fields when indexing, and so does Hibernate Search:
* {{_index}} (the name of the index)
* {{_entity_type}} (the name of the indexed entity type)
* etc.
It would be nice to be able to refer to these fields in the Search DSL, even though they
weren't declared anywhere, e.g.:
{code :java }
AggregationKey<Map<String, Long>> countsByEntityKey = AggregationKey.of(
"countsByEntity" );
SerachResult<MyEntity> result =
searchSession.search(MyEntity.class).extension(ElasticsearchExtension.get())
.where(...)
.aggregation(countsByEntityKey, f -> f.terms()
.field( "_entity_type", String.class ))
.fetch( 20 );
{code}
Note we do NOT want the same for the internal Lucene fields: those are private and should
not be relied on by application developers.
(
https://hibernate.atlassian.net/browse/HSEARCH-4294#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4294#add-comment?atlOrigin...
)
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....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100207- sha1:ee9e30a )