3
votes

All,

Thanks in advance for your help. We are considering using Azure Search for some new development on a multi-tenant system. I have a basic question on searchable vs filterable. When importing data in to search from documentdb the int/float/date types cannot be marked searchable only filterable. This is actually what we want. We are using the Lucene API with search and must support range searches. My question is, if an index is only marked "filterable" vs "filterable | searchable" is the value still "indexed" so the search is fast and the search wont result in a "table scan" (apologize of using SQL terms).

For extra credit, is there a query analyzer for search like in SQL Server that would help us figure this out?

Steve

1

1 Answers

6
votes

You are correct, only fields of type Edm.String and Collection(Edm.String) can be marked as searchable. When a field is marked as searchable, it will undergo analysis such as word-breaking before being stored in the index. The results of this analysis result in extra space being consumed in your index compared to the same field if it weren't marked as searchable.

It is not possible to mark quantitative field types (e.g. Edm.Int32 or Edm.DateTimeOffset) as searchable because this type of data does not benefit from lexical analysis. However, these values will be still be part of your Azure Search index and can be queried in a performant way via filter expressions, which will not behave like a "table scan" in SQL.

Unfortunately Azure Search does not have a query analyzer similar to that of SQL Server. However, Azure Search does offer an Analyze API to see how searchable text is treated by the various analyzers offered the service. Feel free to post the suggestion for a query analyzer to our User Voice site.

Hope this helps!

Ashish