#community-help

Handling Hyphenated Terms in Search Queries

TLDR A asked about search support for hyphenated terms. Jason advised to add hyphen in the token separators config to index them as two words.

Powered by Struct AI
5
23mo
Solved
Join the chat
Feb 05, 2022 (23 months ago)
A
Photo of md5-fe034fbff44e9cae037b7bb23a5080c4
A
05:38 PM
Q: is there some support for terms like “Nicht-Tumorpatienten” in order to be found when I search for “nicht tumorpatienten”
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:40 PM
You want to add hyphen to the token separators config when you create the collection
05:40
Jason
05:40 PM
That will make those get indexed as two words
A
Photo of md5-fe034fbff44e9cae037b7bb23a5080c4
A
05:42 PM
but then searching for “Nicht-Tumorpatienten” would result in no hits, correct?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:05 PM
That setting will apply both during search time and indexing time