This project is not covered by Drupal’s security advisory policy.
This module allows you to group search results as well as denormalize entities when indexing them.
Bot functions are based on the available entity fields.
This functionality becomes handy especially when searching / sorting on multi-value fields has to be done.
E.g. Solr doesn't allow sorting on multi-value fields, further it can't handle the relations between two properties of the same multi-value field.
A denormalized index for entities enables us to do proper searching and
sorting even when multi-value fields are used.
Example of denormalization if we have the following node:
node = {
nid: 1234,
field1: [1, 2, 3],
field2: [1, 2, 3]
}
Following entries in our search index if the denormalization bases on field1 & field2:
NID, field1, field2
-----------------------------
1234 1 1
1234 1 2
1234 1 3
1234 2 1
1234 2 2
1234 2 3
1234 3 1
1234 3 2
1234 3 3
Installation
Attention
This module has following version specific dependencies:
- Search API version >= 7.x-1.6
- Search API Solr >=7.x-1.0
Usage
Denormalization
Create a new Search API index and use a denormalized item type ("Denormalized x").
In the workflow configuration you've to enable the processor "Configure which fields are use for denormalization" and configure the fields to denormalize on.
Grouping
Enable and configure the "Grouping" processor of an Search API index and configure the fields to group on.
Further there's the plan to use query extenders to provide even more flexibility for grouping: #1989856: Add Query Extender
Credits
- Steven Jones for the grouping approach in #1721262: Field collapsing and query extender basics #1720348: Add the concept of query extenders
- Jeff Graham for the nice denormalization approach in his sandbox
- Cando Image GmbH for sponsoring the worktime
Project information
- Project categories: Site search
93 sites report using this module
- Created by das-peter on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
