6

We have a sharepoint 2010 branding site that uses search. The search works just fine, but our client has come back and requested that the content author not be included in the search. This is a fair request - but I can't seem to remove the author from the crawl index.

I tried central admin > search admin > meta data property mappings

I edited the 'author' property and unchecked it's inclusion in scopes. No luck there. I also removed the mappings to crawled properties. No luck there.

Are there other meta data properties that I need to exclude, or am I going about this in the wrong way?

And yes, I've done a full crawl after these attempts.

4
  • What type of content are you indexing? If it's things like Word documents, they contain the author themselves. You might not be able to search a specific property - e.g. for "Author:ScottE" - but "ScottE" would still find the document, and the problem isn't 'in' SharePoint...
    – Andy Burns
    Commented Feb 7, 2011 at 18:41
  • @Andy - it's just a publishing site. No unstructured content like that.
    – ScottE
    Commented Feb 7, 2011 at 18:53
  • It seems to me that removing the reference to the appropriate crawled property in the metadata property should do it. I assume after this change you are adding a new document and then doing a full or incremental crawl. Just trying to take out the possibility (however small) that an existing item in the index does not have its metadata property cleared in such a case. Is it feasible to clear the index in your environment? Commented Feb 10, 2011 at 19:03
  • I tried this in staging already - as explained above. Is that how it should be done? Am I missing a property?
    – ScottE
    Commented Feb 10, 2011 at 19:06

5 Answers 5

3

I see that this is an old post but I can share from my experience and hopefully someone will find it helpful. I had the same issue whereby searching for an author's name brought back way more results than what was relevant for a public facing site.

I found that there were other crawled properties that had names in them, for example, "ows__CheckinComment". Using PowerShell, I went through all the crawled properties that were included in the index and removed them if I thought they had author information in them. After removing them from the index, I had to reset the index and do a full crawl.

Other examples are AssignedTo, CreatedBy, and Email but there could be more.

This article shows you how to do it with FAST but there are similar commands for the OOTB search. Try running this in PowerShell to get some of the commands:

get-command -noun *search*prop*

Hopefully this works for you.

1

I usually customize the results web part to hide the fields i don't want displayed. Core results xsl is normally where i start.

UPDATE

Have you tried reseting the index rather than just doing a full crawl

There are differences: http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/ad53918a-2069-4281-ac31-431081bfe515

4
  • It's not a matter of what's displayed in the summary (we've already hidden the author), it's that the author is part of the search index - so if you search for Scott, for example, you'll see results that I've authored.
    – ScottE
    Commented Feb 4, 2011 at 1:35
  • have you remove the author from the document metadata? and any other references within the document (like header/footer)
    – djeeg
    Commented Feb 4, 2011 at 1:52
  • and also try removing the "editor" property too, thats the user who last modified the document.
    – djeeg
    Commented Feb 4, 2011 at 1:57
  • how do I remove the author from the document metadata? Can't I just prevent it from being crawled? I also tried an index reset + rebuild.
    – ScottE
    Commented Feb 4, 2011 at 17:53
1

Use "ExludeFromSummary" managed property. This post explains you how to do use it, http://www.ableblue.com/blog/archive/2011/11/10/find-me-but-dont-show-me/

1

The SharePoint search engine indexes properties such as "Author" (which you've already resolved), but just like Google, it also indexes the text of a page. That is why this issue is occurring. So, some things to try.

If author needs to show on the page but not in the search results:

Wrap the author field in your page layout with <div class="noindex"> and </div>. That should ensure certain content on the page is not indexed (see Mark Arend's blog for more).

If author is not shown on the page but is still in the search results:

This is SharePoint doing what it sees as its job of being a good Content Management System (in this context). Of course it thinks the author should be included in the indexed text of the page so it's doing that behind the scenes 'to help'.

Now on something like a page layout, you have control over what's displayed, where and when. However search results (as you would have seen from looking at the HTML for the page) always come back as "Hello this is my page. Domain\ScottE etc..." and there is no structure. It's just a plain dump of text.

So, the only way you can resolve this is by going custom code and writing an HTTP module. This is a piece of code that executes after SharePoint has rendered the HTML but before it is displayed to the user. It gives you complete control to alter the output of that HTML.

The code in this module needs to look at perhaps the URL or some other HTML on the page and check if it's a search results page. If so, then it needs to execute a regular expression over the page to remove anything of the form Domain\ScottE. This needs to be as specific as possible to ensure no other comment is removed. Here's a similar example.

If, however, authors are not shown in a pattern that can be matched, unfortunately this is an impossible task. There is no way to recognise a name from any other piece of text. So unless you can come up with some other rule, this is not possible.

5
  • Alex - the problem is not that the author information is displayed (we already removed that), but that the author information is available through public search. If I search for Domain\ScottE search results will be returned. And worse, Domain\ScottE often shows as part of the search summary. So, I really need to remove author for the search index because they client really doesn't want it matched in search!
    – ScottE
    Commented Feb 11, 2011 at 13:35
  • One comment - if you edit the location visualization in notepad or vs.net, don't format it! I pasted it back in indented properly and it broke the page. This may have happened to you.
    – ScottE
    Commented Feb 11, 2011 at 13:37
  • I also removed all mappings and removed 'Author' from the search scope, reset the index and did a full rebuild. Again. Still no luck. Either there are some other properties that I'm missing, or I'm doing this the wrong way. Or SP is screwy.
    – ScottE
    Commented Feb 11, 2011 at 13:47
  • @ScottE: I've rewritten my answer. I hope for your sake that the first option will work! Good luck.
    – Alex Angas
    Commented Feb 11, 2011 at 21:04
  • Domain\ScottE is part of the page text. I don't feel that I've addressed the indexing of the author information - I think I'm still missing something there. Believe me, sharepoint is NOT helping here.Thanks for looking into this further.
    – ScottE
    Commented Feb 11, 2011 at 21:35
0

I needed to do the same. Therefor I excluded everything in the people category in => Central Administration:SearchServiceApplication: Metadata Property Mappings

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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