-2

Help me understand the concept a little bit,

As per documentation:

In Azure Cognitive Search, a search index is your searchable content

If I have to make entire SQL table searchable then does it mean all the columns should be defined as indexable?

Abhijeet
  • 13,562
  • 26
  • 94
  • 175
  • The answer depends entirely on what your db schema/table-design is - and you haven't shared it with us, so I'm curious how you expect us to tell you which of your columns should be indexed or not... – Dai Jul 04 '23 at 13:11

1 Answers1

0

If I have to make entire SQL table searchable then does it mean all the columns should be defined as indexable?

Technically yes, you would need to make all columns indexable (searchable) caveat being the field data type supports searching (currently Edm.String and Collection(Edm.String)).

In fact, Azure Search does not even allow you to set a field as searchable if the data type of such field is not either Edm.String or Collection(Edm.String).

You should also identify the columns on which you would want to filter the data (typically columns containing boolean, date/time or numerical data) and set filterable property as true for those columns.

You should do this exercise to keep your index size small.

Please see this link for more details on index fields: https://learn.microsoft.com/en-us/rest/api/searchservice/create-index#-field-definitions-.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • Hi @Gaurav-Mantri , Can you please take a look at Can you please take a look at https://stackoverflow.com/questions/76682830/filtering-on-azure-search-index-not-working which seems to be a similar question which is on the filtering subject. If you have already seen it, it wouldn't have worked. I have edited the question to make it fully reproducible. – newbie101 Jul 13 '23 at 21:39
  • Pleasure meeting again. Thanks I seem to be receiving quality responses from you for more than a decade now.:-) – Abhijeet Aug 07 '23 at 08:55