<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<base href="https://hibernate.atlassian.net">
<title>Message Title</title>
</head>
<body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429">
<table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0" bgcolor="#f5f5f5"> <!-- header here -->
<tbody>
<tr>
<td id="header-pattern-container" style="padding: 0; border-collapse: collapse; padding: 10px 20px">
<table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0">
<tbody>
<tr>
<td id="header-avatar-image-container" valign="top" style="padding: 0; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="https://secure.gravatar.com/avatar/2a8bdd4ffd282b7185c74b52ab452617?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FYR-6.png" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td>
<td id="header-text-container" valign="middle" style="padding: 0; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="yrodiere" style="color:#6c797f;; color: #3b73af; text-decoration: none" id="email_yrodiere" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b"> Yoann Rodière </a> <strong>updated</strong> an issue </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td id="email-content-container" style="padding: 0; border-collapse: collapse; padding: 0 20px">
<table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; border-spacing: 0; border-collapse: separate">
<tbody>
<tr> <!-- there needs to be content in the cell for it to render in some clients -->
<td class="email-content-rounded-top mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff"> </td>
</tr>
<tr>
<td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff">
<table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0">
<tbody>
<tr>
<td class="page-title-pattern-first-line " style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; padding-top: 10px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiZjkzZmYwNTY0Y2Y5NDI1ZTk3ZTlmYjgwZTYyMDVmOTIiLCJwIjoiaiJ9" style="color: #3b73af; text-decoration: none">Hibernate Search</a> / <a href="https://hibernate.atlassian.net/browse/HSEARCH-3683?atlOrigin=eyJpIjoiZjkzZmYwNTY0Y2Y5NDI1ZTk3ZTlmYjgwZTYyMDVmOTIiLCJwIjoiaiJ9" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-77fa721d-a9b2-4d26-a37a-35d4beb93ec9" height="16" width="16" border="0" align="absmiddle" alt="Improvement" style="vertical-align: text-bottom"></a> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3683?atlOrigin=eyJpIjoiZjkzZmYwNTY0Y2Y5NDI1ZTk3ZTlmYjgwZTYyMDVmOTIiLCJwIjoiaiJ9" style="color: #3b73af; text-decoration: none">HSEARCH-3683</a> </td>
</tr>
<tr>
<td style="vertical-align: top;; padding: 0; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3683?atlOrigin=eyJpIjoiZjkzZmYwNTY0Y2Y5NDI1ZTk3ZTlmYjgwZTYyMDVmOTIiLCJwIjoiaiJ9" style="color: #3b73af; text-decoration: none">Mapping a single entity type to multiple indexes</a> </span> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td class="email-content-main mobile-expand wrapper-special-margin" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; padding-top: 10px; padding-bottom: 5px" bgcolor="#ffffff">
<table class="keyvalue-table" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0">
<tbody>
<tr>
<th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Change By:</th>
<td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <a class="user-hover" rel="yrodiere" style="color:#6c797f;; color: #3b73af; text-decoration: none" id="email_yrodiere" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b"> Yoann Rodière </a> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td class="email-content-main mobile-expand issue-description-container" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; padding-top: 5px; padding-bottom: 10px" bgcolor="#ffffff">
<table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px">
<tbody>
<tr>
<td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0; border-collapse: collapse; padding: 0 0 10px"> <span class="diffcontext">Introduce a way to map a single entity type to multiple indexes:<br><br>* on bootstrap, user code will provide a list of index names that this entity type will be mapped to (instead of just one usually).<br>* at runtime, each entity to index will be inspected by user code upon indexing, and routed to the correct index.<br><br>For example, we could</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> repurpose</span> <span class="diffaddedchars" style="background-color:#ddfade;"> use</span> <span class="diffcontext"> the {{</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">RoutingKeyBridge</span> <span class="diffaddedchars" style="background-color:#ddfade;">IndexedConfigurer</span> <span class="diffcontext">}}</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">, renaming it to a</span> <span class="diffaddedchars" style="background-color:#ddfade;"> on bootstrap and the</span> <span class="diffcontext"> {{RoutingBridge}}</span> <span class="diffaddedchars" style="background-color:#ddfade;"> at runtime; both were introduced in HSEARCH-3108</span> <span class="diffcontext">.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> Its APIs would change a lot, but something like this could do:</span> <span class="diffcontext"><br><br>{code}<br>public class MyRoutingBridge implements RoutingBridge</span> <span class="diffaddedchars" style="background-color:#ddfade;"><MyEntity></span> <span class="diffcontext"> {<br><br> private final IndexReference indexReference1; // Obtained by the</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> binder</span> <span class="diffaddedchars" style="background-color:#ddfade;"> configurer</span> <span class="diffcontext"><br> private final IndexReference indexReference2; // Obtained by the</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> binder</span> <span class="diffaddedchars" style="background-color:#ddfade;"> configurer</span> <span class="diffcontext"><br><br> @Override<br> public void route(</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">Route route</span> <span class="diffaddedchars" style="background-color:#ddfade;">DocumentRoutes routes</span> <span class="diffcontext">,<br></span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> String tenantIdentifier,</span> <span class="diffcontext"> Object entityId,</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> String documentId, Object</span> <span class="diffaddedchars" style="background-color:#ddfade;"> MyEntity</span> <span class="diffcontext"> entity, <br> RoutingBridgeRouteContext context) {<br></span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> route</span> <span class="diffaddedchars" style="background-color:#ddfade;"> routes</span> <span class="diffcontext">.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">index</span> <span class="diffaddedchars" style="background-color:#ddfade;">addRoute</span> <span class="diffcontext">( indexReference1 )</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">;</span> <span class="diffcontext"> //</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> Only</span> <span class="diffaddedchars" style="background-color:#ddfade;"> The argument is only</span> <span class="diffcontext"> necessary if there are indexes declared by the binder<br></span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> route</span> <span class="diffcontext">.routingKey( <compute some routing key> ); // Only necessary if the</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> binder enabled</span> <span class="diffaddedchars" style="background-color:#ddfade;"> user wishes to use custom</span> <span class="diffcontext"> routing keys<br> }<br>}<br>{code}<br><br></span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">This should address most, if not all, of the use cases for Indexing Event Interceptors (HSEARCH-3108). These interceptors are mainly used to prevent indexing of entities that are in a certain state. We could provide a way for users to route an entity to "nowhere" ({{route.discard()}}?), meaning it will be removed from all indexes and will not be added anywhere.<br><br></span> <span class="diffcontext">Note that initially, we'll force all indexes to have the exact same mapping. We'll allow each index to have a different mapping in HSEARCH-3971, and then we'll have addressed part of the use cases mentioned in HSEARCH-3313: essentially all the use cases except those where the list of indexes is not known in advance. Even that one could be covered eventually, in theory but that'll have to be handled in HSEARCH-3313 (if ever).</span> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> <script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"description": "View Issue",
"potentialAction": {
"@type": "ViewAction",
"target": "https://hibernate.atlassian.net/browse/HSEARCH-3683?inbox=true&",
"name": "View Issue"
},
"publisher": {
"@type": "Organization",
"name": "Atlassian",
"url": "https://www.atlassian.com"
}
}
</script>
<table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px">
<tbody>
<tr>
<td id="actions-pattern-container" valign="middle" style="padding: 0; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0">
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0">
<tbody>
<tr>
<td class="actions-pattern-action-icon-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3683#add-comment?atlOrigin=eyJpIjoiZjkzZmYwNTY0Y2Y5NDI1ZTk3ZTlmYjgwZTYyMDVmOTIiLCJwIjoiaiJ9" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-e4cc69e1-7659-4748-97fb-1edfd13db148" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td>
<td class="actions-pattern-action-text-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3683#add-comment?atlOrigin=eyJpIjoiZjkzZmYwNTY0Y2Y5NDI1ZTk3ZTlmYjgwZTYyMDVmOTIiLCJwIjoiaiJ9" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table> </td>
</tr> <!-- there needs to be content in the cell for it to render in some clients -->
<tr>
<td class="email-content-rounded-bottom mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff"> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td id="footer-pattern" style="padding: 0; border-collapse: collapse; padding: 12px 20px">
<table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0">
<tbody>
<tr>
<td id="footer-pattern-mobile-separated-links" class="mobile-resize-text" width="100%" colspan="2" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> Get Jira notifications on your phone! Download the Jira Cloud app for <a href="https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail" style="color: #3b73af; text-decoration: none">Android</a> or <a href="https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8" style="color: #3b73af; text-decoration: none">iOS</a>
<hr> </td>
</tr>
<tr>
<td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian Jira <span id="footer-build-information">(v1001.0.0-SNAPSHOT#100140-<span title="5beb332c0bbb8e6db58df945403bb765c3e0c0be" data-commit-id="5beb332c0bbb8e6db58df945403bb765c3e0c0be}">sha1:5beb332</span>)</span> </td>
<td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0; border-collapse: collapse; padding-left: 20px; vertical-align: top">
<table style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0">
<tbody>
<tr>
<td id="footer-pattern-logo-desktop-padding" style="padding: 0; border-collapse: collapse; padding-top: 3px; opacity: 0.150"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-1b71c394-aec3-4ac6-b741-0b84c6053032" alt="Atlassian logo" title="Atlassian logo" width="192" height="24" class="image_fix"> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table>
</body>
</html>