2013 Results Source query path shows zero relevantresults
-
10-12-2019 - |
Question
I'm trying to create a Result Source that only shows results for a specific site and it's sub-sites. I figured I could use one of the following values:
{searchTerms} (Path:/uk/)
{searchTerms} (Path:http://mysite.net/uk/*)
I have been able to use Path:http://
and get results, but if I put the first letter of my sites domain (i.e. Path:http://m
), with or without the asterisk, I get zero results again.
Can Anyone help me understand how to use the Path
property filter, or suggest a different property filter I can use?
[UPDATE]
From Central Admin > Search Service Application I can set up Result Sources using Path wildcards, i.e. Path:http://mysite/uk*
, but when I try the same query from a Site or the Site Collection, I get zero results.
In case it's relevant: my web application is on port 80 and uses FBA for authentication. My Default content access account
is from Active Directory, so I have extended my port 80 Web App to port 111 without FBA, so that the access account can get to all content without FBA role security being a factor.
This shouldn't make a difference, but maybe it does?
Solution
I found the cause of my issue. This may not explain why Path works for some, but this route allowed me to properly filter my results:
The Path managed property is configured as Complete Matching
, meaning that my Path values of /uk
or http://mysite.net/uk
were doomed to failure, as they are not complete URLs.
My solution was to create a new managed property (which I called PagePath) using the same "Mapping" values as Path, but not checking the Complete Matching
box.
Now, in my query, I can use PagePath:/uk
and I only see results from the /uk site and above.
Hope this helps someone :)
OTHER TIPS
There is also a managed property named Site that can be used and may give you the desired results.
You can create a new Content Source what contains the URL's (internal /external) you want to use as the source for the Result Source. You don't have to create any additional items.
{searchTerms} ContentSource=<name contentsource>
I know it has been a while since you posting, but maybe someone else needs this...
I've had the same problem. In my case I had two different web Applications - one working - the other not. I had set up both With AAN (alternate Access mapping) for Extranet Zone. I discovered that the Web Application/sites having problems were set up With URL from Extranet Zone in Content Source configuration. I changed Content Source settings to crawl using Default Zone, started full crawl and the problem was solved.
In Sever Name Mappings I removed the entry for the site the Path started working.Check and let me know if it works for you.
Another approach is to use the
ParentLink
Example:
ParentLink:uk*