Hi,
Is there a way I can use PowerShell to get a full list of Search Result Sources in the SharePoint farm, including farm, site collection, and web level result sources?
Thank you.
Technology Tips and News
Hi,
Is there a way I can use PowerShell to get a full list of Search Result Sources in the SharePoint farm, including farm, site collection, and web level result sources?
Thank you.
Hi,
We can use the SourceId property in the KeywordQuery object to set which Result Source, and use the Query Transform to narrow search results.
http://blog.mastykarz.nl/programmatically-working-keyword-search-queries-sharepoint-2013/
https://technet.microsoft.com/en-us/library/Dn186229.aspx#BKMK_How_does_query_transform_affect_query
You can also use Search REST API to get the lists, here is a tool for your reference:
https://sp2013searchtool.codeplex.com/
Best Regards,
Thank you Dennis.
But I'm not trying to perform search using a result source. Rather I'm trying to get a list of result sources that's already in the system.
In Search Administration in Central Admin, when you run a Usage Report for Top Queries By Month, the report shows all the query text against the result source it was run against, even if the result source was created for a site collection or site.
Having a farm of tons of site collections, and God know who has created result sources in some site collections, is there a command I can run either in PowerShell or C# that will just give me the full list of result sources and where they were created?
Thank you for your help.
Kind regards