I have a client application that is a complete SharePoint structure (sitecollections, sites and subsites, doclibs, folders) of any third SharePoint site as a navigation tree.
Users can click any level in this tree and search freetext. They expect their search results to appear either in the selected location or below. For instance,
if they click on a site, they only need results on this site. if they click on a folder, they only need results from this folder and any subfolders.
I am trying to accomplish this using the PATH property constraint. However, whenever I turn on the LIKE predicate in PATH, the search results become empty. What am I doing wrong?
SharePoint Search SQL:
SELECT URL,Path,FileName,Version,Size,LastModifiedTime,DocID FROM Scope() WHERE ContentClass='STS_ListItem_DocumentLibrary' AND Path LIKE 'http://servername/doclib001/%' AND FREETEXT(DEFAULTPROPERTIES, 'test' )
(SharePoint2010)
source share