/
How to strip text from fields
This Confluence instance is now read-only, please head over to the Algolia Confluence instance for the same more up-to-date information
How to strip text from fields
This is Indexing pipeline step
You might find yourself wanting to remove text from certain fields. For example, if your website has your brand name appended to every title
field, you might find this unnecessary and irrelevant for search users.
In this example we want our title
fields to go from:
About us page - Brand name
To:
About us page
For this we can add a simple strip-text step to the record pipeline, which will strip out - Brand name
from every title field.
Navigate to Indexing > Advanced and add the following to the preSteps
section of the pipeline:
- id: strip-text
params:
fields:
constant: title:title
text:
constant: '- Brand name'
This will remove '- Brand name'
from the field title
and add the remaining values back into title
.
, multiple selections available,
Related content
How to add a default filter to searches
How to add a default filter to searches
Read with this
How to copy an array item to a new field
How to copy an array item to a new field
Read with this
How to change the styling of your search UI
How to change the styling of your search UI
Read with this
How to replace users' queries with alternative text
How to replace users' queries with alternative text
Read with this
How to see images within the Relevance screen
How to see images within the Relevance screen
Read with this
How to drop a field with an empty value
How to drop a field with an empty value
Read with this