The search experience in Azure DevOps(Server) is powered by ElasticSearch. If for any reason your search didn’t seem to work, a lot of Powershell scripts are available to help you with maintaining, updating and monitoring the health of your ElasticSearch instance.
Remark: Be sure to take the correct scripts for your version of Azure DevOps.
One of the scripts I use the most is the TriggerCollectionIndexing.ps1 script. This script allows you to reindex everything(wiki, workitem, code) at the collection level.
Remark: You have to run this script on a server that has the SQL Server Client Tools installed.
Let’s try it out:
PS N:\Azure_DevOps_Server_2019> .\TriggerCollectionIndexing.ps1
cmdlet TriggerCollectionIndexing.ps1 at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
SQLServerInstance: mytfssqlinstance
CollectionDatabaseName: tfs_defaultcollection
ConfigurationDatabaseName: tfs_configuration
CollectionName: DefaultCollection
EntityType: WorkItem
Cannot load module SQLSERVER. Trying to load SQLPS module.
Loaded SQLPS module...
Cleaned up the WorkItem Collection Indexing state.
Successfully queued the WorkItem Indexing job for the collection!!
Column1
-------
1
In the example above, we triggered a reindex of the WorkItems in a specific collection You can do the same thing for Code or Wiki by changing the EntityType in the command above.