1

I have some users complaining of an odd issue with our search results. When they search the entire site for a specific phrase (ex. - "lincoln"), there are a limited number of results. For the purpose of this explanation, let's say that three (3) results are found. From my viewpoint as an admin, seems like the Search service is working properly.

According to the user, however, a far greater number of results used to appear for that same phrase. They say that, say six months ago, they were getting 100+ results when searching for "lincoln" and now only get the 3 results. Documents are not deleted by the business unit, so anything that was there 6 months or even a few YEARS ago should still be there.

The search results page has no filters applied to it, and should be showing ALL results. Nothing search-related has changed as far as I know. If I search for a different term such as "park", I get numerous results as expected. If I search for "lincoln" while logged in as the farm admin account, I still only get the 3 results, leading me to believe that's all there is.

How can I, as a SharePoint admin, verify that the search results being returned are the correct and only search results?

Is there a backend database in SQL I can directly search for the text "lincoln", or do I have just have to assume that there are only three results?


UPDATE: One of the users was able to find a document that no longer shows up in results. It is a PDF generated in AutoCAD, and the search term ("lincoln") shows up in several places throughout the comments/notation. I confirmed that the PDF text is searchable within Acrobat Reader, so in theory it should also be indexed by the Search Service Application. However, I would still like to find out if there is a way an admin can verify result viability.


ADDITIONAL INFO: This is a SharePoint 2013 Enterprise farm. I have direct access to the servers and can muddle through writing powershell scripts or even C# code if needed, although I'm by no means a professional developer. I also have full access to the SQL backend if needed.

2

One issue with missing search results is how search handles "duplicates". SharePoint uses a very fuzzy definition of duplicates. Documents that you and I would clearly say are not duplicates are seen by SharePoint as duplicates, and are ignored in the search results. You can go to your Enterprise Search center and go to your search results page (you will have at least five, but will at least want to edit the results.aspx page), edit the page, and edit the Search Results web part. Click the Change Query button. Click the Settings tab. Click "Don't remove duplicates". This will only fix the Enterprise Search center, not the search boxes in each site.

I have a detailed walk-through that shows this issue: http://techtrainingnotes.blogspot.com/2015/04/sharepoint-2013-search-weirdness-part-1.html

Other things that might have happened:

  • SharePoint search is security trimmed. If the the users do not have permissions to the site/library/document, it will not show in their search results.
  • Permissions in the library/site with those documents may have been changed, or membership in SharePoint or AD user group may have been changed.
  • The account used by search to crawl the content may no longer have the needed permissions.
  • Another admin could have changed the search crawl schedules or locations.
  • Check the search crawl history for any errors in the last crawl.
  • There could be other search errors. Check the SharePoint logs and the server's Event logs. (A common error is the C: drive of the search server is near full. That's the default location of the non-SQL files. A lot of space is needed here to store new crawl content and to merge crawls.)

Is there a backend database in SQL I can directly search for the text "lincoln"

No. Most of the keyword search content is stored in non-SQL files and is only queryable from SharePoint.

Other tests you can perform:

  • If you know where some of the missing content is stored, go to that library and use the search box immediately above the library content. (May not be displayed in all views or customized pages.) This search returns all files from that library. No "duplicates" are removed.
  • Search using a SharePoint web service, or a direct call to the Search API from C# or PowerShell.
    REST web service call:
    https://yourServer/sites/yourSite/_api/search/query?querytext='lincoln'&selectproperties='Title,Author'&StartRow=1&RowLimit=100
    There is a max number of items returned, but off the top of my head I don't remember it. The data is returned in XML or JSON, so is not pretty to read. Also, security trimming is still in effect for the account running this request.

The best test is to ask the users for one file that they know of that is not being returned by search. Go to that library, verify that it is still there and that the user can directly see and open the file in the library. Then, work backwards from there looking at user permissions, Search crawl logs, SharePoint logs, etc.

Also, add a new file with "lincoln" in it and see if Search finds it.

1

Log in under account which have Site Collection Admin (or Full Read with Web Application policy) and try search exactly the same query... You will see, if you have more results than the user. If yes, he has not permissions on items which he's looking for...

You can also go to Central Administration > Service Applications > Search Service > Crawl Log > Url View

  • Using this method, I put in the URL for the document library in question and find that 152,826 items are available for search (out of 186,215 total). Is there any way I can do a text search and confirm that only 3 of those 152,000 documents contain the phrase in question? – Omegacron Feb 7 at 19:10
  • Go to correct site and search here with the Site Collection/Farm Admin, you should get correct results (as I wrote like first method) – Zdeněk Vinduška Feb 7 at 19:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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