Azure AI Search Solution: Optimize Your Index Size And Schema

 




Optimize Your Index Size and Schema

The effectiveness of your search queries is closely linked to the size and intricacy of your indexes. The quicker Azure AI Search can answer queries, the more compact and streamlined your indexes are.

If you don't pay attention, indexes can grow over time. You should review that all the documents in your index are still relevant and need to be searchable. Consider reviewing all the attributes you've enabled on each field. For example, adding support for filters, facets, and sorting can quadruple the storage needed to support your index.

Improve Performance Of Your Queries

If you're familiar with the workings of the search service, you can optimize your queries to significantly enhance performance. Use this checklist for writing better queries:

  • Only specify the fields you need to search using the searchFields parameter. As more fields require extra processing.

  • Return the smallest number of fields you need to render on your search results page. Returning more data takes more time.

  • Try to avoid partial search terms like prefix search or regular expressions. These kinds of searches are more computationally expensive.

  • Avoid using high skip values. This forces the search engine to retrieve and rank larger volumes of data.

  • Limit using facetable and filterable fields to low cardinality data.

  • Use search functions instead of individual values in filter criteria.

If you've applied all of the above and still have individual queries that don't perform, you can scale out your index.

Based on the service tier utilized for your search solution, you have the option to add as many as 12 partitions. Partitions represent the physical storage locations for your index. By default, all newly created search indexes come with a single partition. When you add more partitions, your index is distributed across them. For instance, if your index size is 200 GB and you have four partitions, each one will hold 50 GB of your index.

Because the search engine can operate in parallel in each segment, adding more partitions can improve speed. The queries that use facets to provide counts over large numbers of documents and those that return a big number of documents show the greatest benefits. This contributes to the computational cost of determining a document's significance.

Conclusion

We have successfully learnt about optimizing index size and schema.







Comments

Popular posts from this blog

Connect Data to Azure Sentinel Using Data Connectors

Information Protection Scanner: Resolve Issues with Information Protection Scanner Deployment

Azure AI Search plugin in Microsoft Security Copilot (Preview)