0

We Use Azure Cognitive Search In our E-commerce Application, users can search by product name, category, and code.

Is there Any Way to get all the search history from Azure Cognitive Search?

Is there a way to acquire Azure Cognitive Search's Most Recent Search Terms for Each User?

Is there a way to retrieve the most popular search keywords used by each user from Azure Cognitive Search?

Pete Ythong
  • 305
  • 5
  • 13
Ramakrishna.p
  • 1,159
  • 12
  • 31

1 Answers1

0

You should use Kusto Query Language (KQL) + Log Analytics to get a list of recent searches.

Here's a sample:

AzureDiagnostics
| where Category == "AzureCognitiveSearch"
| where OperationName == "Search"
| summarize count() by searchText
| top 10 by count_

I guess if you pass the user id as a parameter, you should be able to use it as a filter too.

more info:

https://learn.microsoft.com/en-us/azure/search/search-monitor-queries

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Thanks for the Quick update @thiago , I was looking at API from Azure query requests in Azure Cognitive Search, not from the AzureDiagnostics. – Ramakrishna.p Mar 10 '23 at 14:09
  • logs from Azure Cognitive Search will be sink to Log Analytics. That's definitely where you'll find your data (searches, terms, etc) – Thiago Custodio Mar 10 '23 at 14:13
  • @Ramakrishna.p unfortunately there's nothing else ready to use besides what I post. I added another query sample which would list top 10 popular searches. – Thiago Custodio Mar 14 '23 at 13:35