Elasticsearch tokens with adjacent concat while preserving other words

I want to create a custom analyzer which generates tokens so that in each token, one pair of adjacent words are concatenated while preserving rest of the query string.

Example Query : "quick brown fox jumps"
Generated tokens: "quickbrown fox jumps", "quick brownfox jumps", "quick brown foxjumps"

It's looking close to what shingles are doing... Have a look at Shingle token filter | Elasticsearch Guide [8.12] | Elastic

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.