locked
indexer filtering RRS feed

  • Question

  • is it possible to place a temporary filter on an azure indexer  so that it refrains from indexing certain blobs?
    • Edited by Glenn Venzke Thursday, September 7, 2017 7:46 PM
    Thursday, September 7, 2017 7:38 PM

Answers

  • Yes. The mechanism for doing so differs depending on the datasource:

    - For blob indexers, there's a variety of filtering mechanisms. See https://docs.microsoft.com/en-us/azure/search/search-howto-indexing-azure-blob-storage#controlling-which-blobs-are-indexed

    - For DocumentDB and Azure table indexers, you can modify the datasource query to exclude certain documents.

    - For Azure SQL indexer, if you're indexing from a view, tweak that view. If you're indexing from a table, you can't exclude particular documents. However, you can use a soft delete policy to delete such documents from the index.

    HTH!


    Thanks! Eugene Shvets Azure Search

    Thursday, September 7, 2017 7:49 PM
    Moderator

All replies

  • Yes. The mechanism for doing so differs depending on the datasource:

    - For blob indexers, there's a variety of filtering mechanisms. See https://docs.microsoft.com/en-us/azure/search/search-howto-indexing-azure-blob-storage#controlling-which-blobs-are-indexed

    - For DocumentDB and Azure table indexers, you can modify the datasource query to exclude certain documents.

    - For Azure SQL indexer, if you're indexing from a view, tweak that view. If you're indexing from a table, you can't exclude particular documents. However, you can use a soft delete policy to delete such documents from the index.

    HTH!


    Thanks! Eugene Shvets Azure Search

    Thursday, September 7, 2017 7:49 PM
    Moderator
  • how would I modify the data source's blob folder using c#? Can't seem to find documentation on that
    Friday, September 8, 2017 4:02 PM
  • This is the `pathPrefix` parameter when calling DataSource.AzureBlobStorage (https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.search.models.datasource.azureblobstorage?view=azure-dotnet#Microsoft_Azure_Search_Models_DataSource_AzureBlobStorage_System_String_System_String_System_String_System_String_Microsoft_Azure_Search_Models_DataDeletionDetectionPolicy_System_String_ ).

    Or, if you're updating a DataSource instance you retrieved from the service, use DataSource.Container.Query property (https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.search.models.datacontainer.query?view=azure-dotnet#Microsoft_Azure_Search_Models_DataContainer_Query )

    HTH!


    Thanks! Eugene Shvets Azure Search


    Friday, September 8, 2017 6:46 PM
    Moderator