locked
Difference between Search Indexer vs Search Indexer through CosmosDB in Azure RRS feed

  • Question

  • Hi All,

    I have gone through the documentation of Azure Search, Search Indexer acts a table which contains a document acts as a row and we can create Search Indexer to add/update documents along with search. we can use it as storage, then why do we need to data source to have database when we can all the things with Search Indexer with data source.Can some one please let me know so that I can pick up the correct approach to implement.

    Thanks and regards

    Stick


    • Edited by Asif.Stick Saturday, March 23, 2019 9:52 AM
    Saturday, March 23, 2019 9:50 AM

All replies

  • The Azure Cosmos DB indexing and Azure Search indexing are distinct operations, unique to each service. Before you start Azure Search indexing, your Azure Cosmos DB database must already exist and contain data. Yes, a data source specifies the data to index, credentials, and policies for identifying changes in the data (such as modified or deleted documents inside your collection). The data source is defined as an independent resource so that it can be used by multiple indexers.  Checkout the document How to index Cosmos DB using an Azure Search indexer for more details on this topic. Could you please let us know if you’re referring to any specific document and looking for any specific difference or details.

    Monday, March 25, 2019 1:46 PM
  • Hi Ajay,

    Thanks for replying, The explanation is pretty much cleared. I have gone through the documentation and came to know that We can create index and add or update data  to Search Index through rest API's this will acts as collection of documents as We can query to search Index.Off course Search Indexer crawls the data from data source and fill the data to index and then we can query to search index.

    My Question is : We can create search index independently and add data to search index through rest api's this will act as data storage( similar to  table in sql), So in this case We don't require data source. Right? Please correct if i am wrong then why do we need data source in this situation.Is there any specific reason to have data source.

    Another thing, There is schedule program(minimum 5 minutes interval) that indexer sync the data source to search index whenever data source updates. Here question is if frequent changes occur in data source and in every 5 mins search indexer updates the search index then will it impact the performance the query data from search index as frequent re indexing may slow down the performance.What would be better to  sync search index data through schedule program  or programmatically whenever new record is added in data source. Can you please suggest me the correct approach.

    Thanks

    Stick




    • Edited by Asif.Stick Monday, March 25, 2019 5:54 PM
    Monday, March 25, 2019 5:50 PM
  • If you create an index and are adding documents to the index using the REST API then you don’t need to connect a data source like you would if you were using an indexer.

    The indexing into Azure Search will have an impact on the performance of the search queries. This page provides information on best practices for optimizing performance on Azure Search. The suggested way forward here is to test various workloads to make sure that performance meets your needs.


    Thursday, March 28, 2019 12:46 PM