Azure Search Index - Random Results RRS feed

  • Question

  • We are using Search Index to run one of our API. The data to the index is populated using the Azure functions which pull data from the database. The API does have a search operation and the search operation is running against the search index. We have a requirement for returning random results which satisfy the API search criteria. i.e. if the number of search results that meet the search criteria is 1000 and if we need only 100 random items from the list, Is it possible? The search should always return random results.

    Wednesday, August 30, 2017 1:45 AM


  • Azure Search doesn't support any kind of random sorting or ranking. You would have to implement this yourself by retrieving all the results and then taking a random selection from them.
    Wednesday, August 30, 2017 6:30 PM