Search code examples
partitioningazure-cognitive-search

Azure Search partitions - How does partitioning work?


While adding more partitions in Azure Search Service, I see it doesn't require any partition key. We push data from our application and don't use indexer to pull it. Assuming I have only one index and I am using 3 partitions, I have below questions:

  1. While pushing a document into the index, how does the service know which partition to create that particular doc in?
  2. While querying documents, does the service fan-out query across all partitions every time and then collate the results?

Solution

    1. The service decides which partition the document should be created in based on the document's id. We don't expose which partition a document is in, and you don't need to know this information to search for a document.
    2. Yes. Please see our tutorial on service scalability for more information on how to plan for search and indexing capacity and performance optimization