#community-help

Converting String Fields to Array Fields

TLDR Eric had queries regarding converting string fields to array fields. Jason offered a solution involving setting parameters in the collection schema.

Powered by Struct AI

1

Sep 21, 2023 (2 months ago)
Eric
Photo of md5-d6a99d309e192012e905e96e7511251f
Eric
08:13 PM
I am being hesitant converting one of my string fields to an array field.
Is it possible to do a search like my_field:=\b254\b to match something like 253,254,270 to not match 2544,2540
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:52 PM
If you set token_separators: [","] in the collection schema, then set prefix=false as a search parameter you should be able to do this
Sep 22, 2023 (2 months ago)
Eric
Photo of md5-d6a99d309e192012e905e96e7511251f
Eric
08:01 AM
Cool. Thanks.

1