Microsoft SharePoint搜索-忽略页面的各个部分 [英] Microsoft SharePoint Search - Ignore sections of the page

查看:85
本文介绍了Microsoft SharePoint搜索-忽略页面的各个部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft SharePoint搜索(MOSS)搜索网站上的所有页面.

I am using Microsoft SharePoint Search (MOSS) to search all pages on a website.

我的问题是,当您搜索网站的页眉,页脚,菜单或标签云部分中出现的单词时,该单词将出现在每个页面上,因此搜索服务器将为您提供搜索结果列表搜索字词:网站上的每个页面.

My problem is that when you search for a word that appears in the header, footer, menu or tag cloud section of the website, that word will appear on every page, so the search server will bring you a list of results for that search term: every page on the website.

理想情况下,我想告诉搜索服务器忽略其搜索索引中的某些HTML部分.

Ideally I want to tell the search server to ignore certain HTML sections in its search index.

本网站似乎描述了我的问题,一个人说:如果用户代理是搜索服务器,为什么不隐藏网站的那些部分.

This website seems to describe my problem, and a guy says "why not hide those sections of your website if the User Agent is the search server.

这种方法的问题在于,我隐藏的大多数部分都包含指向其他页面的链接(菜单和标签云),因此爬网程序将陷入僵局,并且不会爬得很远.

The problem with that approach is that most of the sections I hide contain links to other pages (menu's and tag clouds) and so the crawler will hit a dead end and won't crawl very far.

有人对如何解决此问题有任何建议吗?

Anyone got any suggestions on how to solve this problem?

推荐答案

我不确定我是否阅读正确.您不希望Search将该网站的一部分包括在索引中,但是您希望它进入该部分并跟随其中的任何链接吗?

I'm not sure if i'm reading this correctly. You DON'T want Search to include parts of your site in the index, but you DO want it to go into that section and follow any links in it?

我认为最好的方法是确实基于用户代理排除那些部分(即,将它们添加到用户控件中,并且如果用户代理是MS Search,则不会呈现该部分).

I think the best way is to indeed exclude those section based on user agent (i.e. add them to a usercontrol and if the user agent is MS Search you don't render the section).

由于这些部分在每个页面上都是相同的,因此可以在搜索搜寻器出现时将它们排除在外.

Seeing as these sections would be the same on every page, it's okay to exclude them when the search crawler comes by.

只需创建一个页面(即站点地图:-D).确实包含普通用户在页脚/页眉/等中看到的所有链接.然后,爬网程序可以使用该页面来跟踪更深入您网站的链接.鉴于抓取工具只会遇到一次链接而不是在每个页面上,因此这也将提高性能.

Just create ONE page (i.e. a sitemap :-D). that does include all the links a normal user would see in the footer / header / etc. The crawler could then use that page to follow links deeper into your site. This would be a performance boost as well, seeing as the crawler only encounters the links once instead of on every page.

这篇关于Microsoft SharePoint搜索-忽略页面的各个部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆