[hibernate-issues] [JIRA] (HSEARCH-3926) Predicate on multiple fields designated by a single label/group name/etc. ("_all", copy_to, ...)

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Mon Jul 27 06:47:46 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=eyJpIjoiNDNiM2U2MTRmMWQzNGQ5NDliMDBiMDIyZTY1MDg2YjQiLCJwIjoiaiJ9 ) / New Feature ( https://hibernate.atlassian.net/browse/HSEARCH-3926?atlOrigin=eyJpIjoiNDNiM2U2MTRmMWQzNGQ5NDliMDBiMDIyZTY1MDg2YjQiLCJwIjoiaiJ9 ) HSEARCH-3926 ( https://hibernate.atlassian.net/browse/HSEARCH-3926?atlOrigin=eyJpIjoiNDNiM2U2MTRmMWQzNGQ5NDliMDBiMDIyZTY1MDg2YjQiLCJwIjoiaiJ9 ) Predicate on multiple fields designated by a single label/group name/etc. ("_all", copy_to, ...) ( https://hibernate.atlassian.net/browse/HSEARCH-3926?atlOrigin=eyJpIjoiNDNiM2U2MTRmMWQzNGQ5NDliMDBiMDIyZTY1MDg2YjQiLCJwIjoiaiJ9 )

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

Sometimes it's not practical to explicitly list all the fields one wants to target when searching. Maybe there are lots of them, maybe you just want to target all fields that can be targeted, ...

Some related discussions on the forums:

* https://discourse.hibernate.org/t/hibernate-search-6-0-0-beta6-simplequerydsl-breaking/3977/6
* https://discourse.hibernate.org/t/support-for-copy-to-mapping-on-fields/415

Elasticsearch offers several solutions to that problem; we should investigate and pick the most appropriate.
In particular:

* Some queries implicitly target all relevant fields when we don't pass a field name (simple query string in particular)
* The {{copy_to}} attribute in the mapping allows copying the content of a field to another at indexing time : https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html
* I remember seeing something about an {{_all}} field whose content is the content of all other fields? Though I believe it was disabled by default.

Alternatively, we could use our own concept of groups in Hibernate Search:

* Assign one or more groups to each field.
* When searching, specify the group name instead of the field name, which will select all fields with that name.

We already need that concept of groups for other features, and will most likely introduce it in HSEARCH-3903, so... two birds with one stone?

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

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#100140- sha1:fbb0377 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200727/49607256/attachment.html 


More information about the hibernate-issues mailing list