I am trying to understand how Azure Search Service works. If you have a comma delimited file that contains 4 fields, do you have to create an Index that contains all four fields? If you don't care about one of the fields in the comma delimited file, can you just not include it in the Index definition? When you upload the data (using code) will Azure Search Service just ignore the additional field, throw an error, or create a new field in the index?
1 Answers
If you have a comma delimited file that contains 4 fields, do you have to create an Index that contains all four fields?
Not really.
If you don't care about one of the fields in the comma delimited file, can you just not include it in the Index definition?
Yes, you can certainly do that. If you really don't care about the field then you can simply skip that field during the import process. You don't really have to create a field for that as well.
Yet another option would be to include the field and set its attribute in such a way that you are not able to perform any searches on that field. For example, you can set this field's searchable and filterable attributes to false but set retrievable attribute to true so that you can at least see this in your search results. More about field attributes can be found here: https://docs.microsoft.com/en-us/rest/api/searchservice/create-index#bkmk_indexAttrib.