You Get More Results in the Query Builder for a Web Part Than When the Web Part is Rendered on the Page in SharePoint 2013

I’ve had this issue happen to me a while back and then I saw two other people have the same problem in the last couple of weeks so I decided to do a quick post on this. The scenario usually manifests itself something like this: you are working on some kind of custom search application – like doing a query based a custom managed property or something like that. You edit the search web part properties and open up the query builder. When you run your query in there you see all of your search results being returned. However, when you save the web part changes and load the page, you don’t see all of the search results; you get a smaller number of results returned.

One of my initial efforts at fixing this was to change the trim duplicates property in the web part to false, even though I knew I did not have any real duplicates in my search results (they were all site collections, something I would not have thought we would even do a duplication check on). That did not fix the problem anyways, but one of the folks here suggested that using that property in the web part settings may not be sufficient to actually resolve the problem.

His suggestion was to export the web part and save it locally. If you open it up in an editor like Notepad, look for property called DataProviderJSON, and you will see a sub-property in there called TrimDuplicates. By default it is true, so change it to false and then import the .webpart back into a site collection and add it to the page. I was happily surprised to find that this did in fact fix this problem for me, and I started getting back a full set of results. I burned a lot of hours though trying to get this working “as expected” out of the box, so hopefully this post will save you some time.

Comments

  • Anonymous
    January 01, 2003
    thanks for sharing.
  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    January 01, 2003
    Hi, I've seen this alot as well and wrote a PowerShell snippet which can edit this for you over at http://techmikael.blogspot.no/2013/12/duplicate-trimming-in-sharepoint-2013.htmlThe real question is why the trimming is so coarse with those four checksums. I always turn it off as it gives more customer support questions to leave it on. Better to tell them to remove real duplicates which might show up.Thanks,Mikael Svenson
  • Anonymous
    September 18, 2014
    The comment has been removed
  • Anonymous
    September 18, 2014
    The comment has been removed
  • Anonymous
    January 08, 2015
    m88 : http://m88en.com
    M88.com offer online sports games Asia, Sports Betting Asia, Sports Betting Sites Asia.
    m88asia : http://m88en.net
    Link to M88BET phone: m88en.com. – Register and Open Betting Account and Membership M88BET.
    m88bet : http://www.linkm88vip.com
    MANSION88 the house is one of the largest and most prestigious. Appeared quite early in the Asian market, the so-MANSION88 currently attracts more players.
    link m88 : http://m88wiki.com
    Home the M88 is the official sponsor of the football club in the Premier League
    Wish you happy with the new M88
    m88 casino online : http://m88free.com

    Modern Thai restaurant combines outstanding traditional cuisine and a subtle modern decor with a warm welcoming ambience. Thai Restaurants in Brisbane :http://www.watersidethainoodles.com.au , traveller reviews of Brisbane Thai restaurants and search by price, location, and more..