I have a client application that represents the complete SharePoint structure (sitecollections, sites & subsites, doclibs, folders), of any given 3rd pary SharePoint site, as a navigation tree.
Users can click on any level in that tree, and do a freetext search. They expect their search results to originate in either the selected location or below. For instance,
I'm trying to accomplish this using a restriction on the PATH property. However, whenever I include a LIKE predicate on the PATH the search results turn up 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)