Customize aggregate field fulltext separator

Created on 23 February 2017, almost 8 years ago
Updated 17 June 2023, over 1 year ago

Problem/Motivation

When you create an Aggregate field Data alteration Filter on an Index, you can choose an Aggregation type. One of the Aggregation types is Fulltext which processes the data as follows...

return isset($a) ? $a . "\n\n" . $b : $b;

... this code is in the function \SearchApiAlterAddAggregation::reduce().

An administrator may want to use a separator other than two newline characters.

Proposed resolution

Turn the separator into a configuration option, expose the configuration option to the administrator.

Remaining tasks

  1. Determine if it is possible to access configuration options in \SearchApiAlterAddAggregation::reduce().
  2. Write a patch that adds the configuration option to \SearchApiAlterAddAggregation::configurationForm() and company, and uses the configuration option in \SearchApiAlterAddAggregation::reduce().
  3. Review and feedback
  4. RTBC and feedback
  5. Commit

User interface changes

New configuration option when adding an aggregate field.

API changes

New configuration option in \SearchApiAlterAddAggregation.

Fulltext aggregate field could separate items with something other than two newlines.

Data model changes

None.

Feature request
Status

Fixed

Version

1.0

Component

Plugins

Created by

🇨🇦Canada mparker17 UTC-4

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024