6

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?

  • Have you tried Path:http://m*.*? – Andrey Markeev Jun 17 '13 at 20:05
  • Just tried that - no luck. Still returns zero results in the query builder. – QMKevin Jun 18 '13 at 12:33
  • We just add path:mysite/uk to get all items with a url starting with mysite/uk. No stars needed – Robert Lindgren Jun 19 '13 at 13:34
  • Roger. I have the problem when one web Application has working search, the other not. Could you tell me more about your solution, please? The site having problem has Default Zone tuning in alternate Access mapping. I can't find Content Source configuration settings to change... I am new in SharePoint – Anonymous Jul 7 '17 at 14:34
7

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 :)

  • Thanks for the answer. The new managed property option worked. – Shoban Jan 13 '14 at 17:02
0

There is also a managed property named Site that can be used and may give you the desired results.

0

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>

0

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.