0
votes

I am running indexer to seed data to azure search index and the data source for the indexer is a sql view. Azure uses Comma delimiter to split and put data into collection type field. Is there any other delimiter that I can configure to use instead of comma?

Let's say I have this list of strings that I want to be part of index collection type field 1.)"item1, test" 2.)"item2, test". From my sql view I return this data as item1~ test,item2~ test. I am replacing my , in each word with ~ because azure treats , as a delimiter for its collection type field and I don't want azure breaking my string in the wrong place. Now azure saves this data as "item1~ test", "item2~ test". When I am returning search results I replace ~ back with ,

The problem I am facing with this technique is that when a user searches for item1 it is treating item1~ as partial match because of ~ and weighing it's score down. In the background that's just item1 to me and I want that be treated as full match.

So I was wondering if I can use any other delimiter instead of , so that I don't have to replace it with special characters and replace it back in my search results.

1

1 Answers

1
votes

Are you able to change the output of the view to return the SQL string to be a string that is a JSON array of strings?

A SQL string can be used to populate a Collection(Edm.String) field if the string represents a JSON array of strings: ["red", "white", "blue"] [SQL data mapping]1