Limit the Scope of your Result Sources

Properly formatted queries matter!

Matthew McDermott

by Matthew McDermott on 4/23/2014

Share this:
Print

Article Details

Date Revised:
4/23/2014

Applies to:
search page, search term


I struggled with what to title this post. I run across this all the time when evaluating "OPW" (Other People's Work). If you navigate to a search results page that does not have a query defined and you see a whole bunch of "Default Results" then you know what I am talking about.

The Problem

This is what I mean. In the picture below I am on my "Customer" search page and I have not entered a search term, yet I still get results. My page is using a Result Source that is defined as: {searchTerms} BCSEntityName:DHTCustomer Which applies the search box term and adds the additional filter for my Customer entities from BCS.

mcdermott-resultsource1

Resolution

Above I used 59 words to attempt to describe a problem that has the shortest of solutions. You think that the problem lies somewhere in your search page, but it actually resides on the Result Source. If you change your Result Source to use the following notation you will get the desired result. {?{searchTerms} BCSEntityName:DHTCustomer} 

No Search Term, No Query.

mcdermott-resultsource2


Topic: Search

Sign in with

Or register