Can a FullTextSqlQuery in SharePoint use the “This Site” contextual scope?
-
09-12-2019 - |
Question
I want to limit my full text SQL query to a single site collection and I am calling the SharePoint search.asmx web service directly from Javascript. Is there some way to limit this using something in the Query Schema? This is on SharePoint 2010 Standard. I realize that Foundation would limit the results on its own, so there must be a way.
Solution
You can add something like this to your query:
AND site = 'http://blah/subsite/anothersite'
But in general I'd recommend that you move to KeywordQuery syntax instead of FullTextSqlQuery as the later isn't supported by FAST.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange