locked
Indexer with Document DB Azure Search RRS feed

  • Question

  • Hello,

     I have used indexer with scheduler options and I have created a daily indexer which will run and index documents from Doc DB collection to the Azure search index. There are a few questions which are coming to my mind : 

    1. Every time when the indexer run, is it going to index all the documents in the collection or the documents which are newly occurred after the last run?

    2. If the indexer is going to again index all the documents in the collections, Like elastic search, is it going to simply over write the documents with same Id?

    3. Instead of using classic scheduling, Can I configure my indexer to run every time when there is a new document in the Document DB collection?

    Any help on the above questions would be great as it will help me to design my solution and understand the Azure Search indexers in a better way.

    Thanks in Advance.

    Monday, June 27, 2016 10:00 AM

Answers

  • 1. That depends on whether or not you are using a change detection policy. See https://azure.microsoft.com/en-us/documentation/articles/documentdb-search-indexer/, specifically Capturing Changed Documents section. If you are NOT using change detection, then all documents will be re-indexed on each run. If you are using change detection, then only the new and updated documents will be indexed.

    2. Indexer uses the "mergeOrUpload" indexing action to insert documents. That means that existing documents will be merged, not simply overwritten. This means that you can "assemble" documents from several different sources. Deleted documents use the "delete" indexing action, of course.

    3. No. If you need real time updates, consider inserting your document into Azure Seach index at the same time you add the document to DocumentDB collection.

    Those were great questions! Hope this helps.  

     

    Thanks! Eugene Shvets Azure Search

    Monday, June 27, 2016 8:03 PM
    Moderator