Sharepoint 搜索属性权重
我正在使用此处列出的代码:
http://msdn.microsoft.com /en-us/library/ms553069.aspx
在设置属性后添加了一行作为对 .update() 的调用以保存更改,但即使权重为 10,000,搜索结果我的财产仍然处于底部,特别是在标题下方。 为了传播权重,还需要做一些其他事情吗?
我还尝试将标题、作者和文件名设置为 0,将属性(关键字)设置为 9999,并将属性的长度规范化设置为 0。结果略有变化,但使用与属性匹配的关键字进行搜索仍然如此不匹配。
所有测试都是在之后进行完整爬网、重置 IIS 并回收共享服务应用程序池来完成的。
我可以为您提供您可能要求的任何额外信息。
谢谢, Stefan
更新 (6-19-09):为此添加了 500 的赏金。 网上关于此功能的信息很少,显然一个好的答案将为互联网社区提供巨大的服务。 它可能也会为我节省一周的时间:)
更新 2 (6-19-09):架构本质上是这样的:OOB 共享点文档内容类型,添加了文本字段“关键字”。 附加到 ows_keywords(Text) 的托管属性。
更新 3 (6-19-09):Codeplex 的 Sharepoint Search Bench 为搜索提供了很大帮助。
更新 4 (6-19-09):我已经找到了一个解决方案,该解决方案涉及使用相同的已爬网属性创建更多(现在是 5 个)托管属性。 每个权重都设置为不寻常的值(例如 9999)。 这些足以将关键字结果提升到顶部。 但不太理想。 仍在寻找解决方案。
Update 4 中的解决方案就是我最终得到的。 正如 Lars 评论的那样,搜索不是很灵活,尽管对属性权重进行了调整,但效果并不总是您所期望的。
I'm using the code listed here:
http://msdn.microsoft.com/en-us/library/ms553069.aspx
With an additional line added as a call to .update() after the property is set in order to save the changes, but even with a weight of 10,000 the search results for my property are still at the bottom, particularly below title. Is there some other things that need to be done in order to get the weighting to propogate?
I've also tried setting the title, author, and filename to 0, setting the property (keywords) to 9999, and setting length normalization of the property to 0. The results shift a bit, but searches with keywords that match the property still do not match.
All tests were done with a full crawl afterwards, reset IIS, and recycle the shared services app pool.
I can give you any extra information you might request.
Thanks,
Stefan
UPDATE (6-19-09): Added a bounty of 500 to this. Very little information about this feature available online, apparently a good answer would a huge service to the internet community. It'd probably save me a week too :)
UPDATE 2 (6-19-09): The schema is essentially this: OOB sharepoint document content type with added text field "Keywords". Managed property attached to ows_keywords(Text).
UPDATE 3 (6-19-09): Sharepoint Search Bench from Codeplex has helped the search a lot.
UPDATE 4 (6-19-09): I've arrived at a solution that involves creating many (5 right now) more managed properties with the same crawled property. Each weight is set to something unusual (like 9999). These do enough to buoy the keyword results to the top. Less than ideal though. Still looking for a solution.
The solution in Update 4 is what I ended up with. As Lars commented, the search is not very flexible and despite offering tweaks to the property weightings, the effect is not always what you would expect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我假设 .update() 调用在 main() 末尾完成是否正确? 如果没有,请尝试,如果是,请确保该程序正在运行。 我还假设 strPropertyName 是您想要的。 除此之外,我实在帮不了你。
Would I be correct in assuming the .update() call is being done at the end of main()? If not, try that, if so then make sure the program is running. I would also assume that the strPropertyName is the one you want. Other than that, I can't really help you.
当您搜索属性中存在的关键字时,该属性只会对排名分数产生积极影响。 对于任何其他查询,权重没有任何影响! 例如,当搜索关键字“SharePoint 搜索”时,标题属性权重可确保标题中包含这些关键字的文档的排名分数得到提升。 但是标题中没有任何这些关键字的文档不会因标题权重而增加。 这适用于文本类型的所有托管属性。
The property only positively affects the ranking score when you search for keywords present in the property. For any other query the weight has no effect whatsoever! E.g. when searching for the keywords "SharePoint Search", the title property weight ensures that the ranking score is boosted for documents having these keywords in the title. But documents without any of these keywords in the title are not boosted by the title weight. This applies to all managed properties of type text.
更改属性的权重不需要重新抓取,只需重置搜索服务即可。
在网上找到了这个:
编辑:在这里找到它:Larry Kuhn 的博客
Chaging the weighth of a property should not need a recrawl, just a reset of the search service.
Found this on the internet:
Edit: Found it here: Larry Kuhn's blog
您是否尝试过仅使用 0 到 1 范围内的权重? 例如,将所有其他属性权重设置为 0.2,并将关键字设置为 0.8。 我在使用 Lucene 时遇到了一些问题,这与量级有关。
此外,如果它从未在结果中添加该属性字段中的命中(尝试添加 xyzzy 关键字或其他内容并搜索它),那么它可能根本与权重无关,而是与关键字是否相关考虑您的搜索。
Have you tried using only weights in the 0 to 1 range? For example set all the other property weights to 0.2 and set keywords to 0.8. I had a little trouble with Lucene along these lines, and it was magnitude related.
Also if it's never adding hits in that property field to the results (try adding an
xyzzy
keyword or something and search for it) then it's probably not weight related at all, but rather related to whether the keywords are considered for your search.