Tuesday, April 12, 2016

SharePoint 2013: searchbox on lists/libraries shows no items - standard search works fine...

Recently experienced and solved the following problem:

Search-boxes on lists and document libraries did not show any results even thought standard basic search in osssearchresults.aspx and custom search web parts and web search results worked perfect. My crawler worked fine and I did not find any issues with search service anywwere.

InplaceSearchQuery on document library:

 Default search result page:



Tried every suggestion I could find related to the same problem - no luck. I also checked queries with ULS viewer - nothing suspicious there either.

So, what´s the difference between the basic search result function and InplaceSearchQuery? Apparently this has to do with a server mapping I´ve used on this Site Collections. The InplaceSearchQuery function looks for items in the index based on the wrong URL (my user-friendly URL due to the server mapping). Basic search apparently works differently...

Details:

I have two web applications setup for my solution - actually one default web application (for crawler) and this is extended to another web apps with claims based. The portal for crawling is the default zone portal - and the user-friendly portal is in a custom zone. The crawler does NOT support claims so it has to have NTLM - also imporant: create crawler NTLM portal FIRST in default zone - then extend to your user-friendly portal. I also had a server mapping defined in order to map crawler URL to user-friendly URL for the users in the search results (this is where the culpit is...!) - I thought this was necessary and it looked alright since basic search etc worked fine.

Server mapping:  <crawler-web apps>:<port>    =     <user-friendly web apps>

This server mapping turned out to be the problem, and it was not necessary either because the URL´s in the user-portal showed up correctly without the mapping (I suspect this works because my crawler portal is defined in the default zone).

When I deleted the server mapping, performed a full crawl and tested search again in my document library, things looked good:




1 comment:

  1. When using claims based portals in SharePoint I have good experience with this model:

    1. Create the NTLM based web application first in Default Zone (for crawling)
    2. Then extend that to a new web application where authentication can be claims based etc

    This is better for Search etc. because the crawled site collection is in the default zone.

    ReplyDelete