SharePoint 2010–Search Core Results Append Text To Query Causes Best Bets Not To Display

Had an interesting issue where my Best Bets web part stopped displaying the keywords when I added the IsDocument:true filter to the “Append Text To Query” box.  It turns out that on the backend the value in the box was being passed to the query engine along with the query value, so for instance “Minutes” (Which matches a keyword) became “Minutes IsDocument:true” (which is not).

After a bit of digging I came up with and interesting scenario – Since the first core results was causing the issue, what if I removed the filter condition from it (so it now triggered the best bets) and added a second core results with the filter I wanted?  Displaying both on the page for comparison I noticed the first unfiltered one triggered the best bets, and the second core result showed the filtered results that I wanted.

The solution was:

1. remove the IsDocument:true from the first (default) Search Core Results "Append Text to Query" box

image

2. Add a second Search Core Results to the results page, add IsDocument:true to the second core results web part and position it in the spot right above the original core results web part.

image

3. Hide the first core results web part (hidden checkbox under the layouts area)

image

So now I have best bets triggering off of the first result set and being displayed in the best bets web part, but my second filtered core results web part is showing the filtered query set to the user.

One thought on “SharePoint 2010–Search Core Results Append Text To Query Causes Best Bets Not To Display”

Leave a Reply