简体   繁体   English

Sitecore lucene搜索/现场提升

[英]Sitecore lucene search/ field boosting

I'm trying to do a global search on the website (I'm using Sitecore 8.1) using Lucene and field boosting. 我正在尝试使用Lucene和现场助推器在网站上进行全局搜索(我正在使用Sitecore 8.1)。 The idea is that I want to search in the content that is on the pages, and not all the pages have the same template. 我的想法是,我想搜索页面上的内容,而不是所有页面都有相同的模板。 So I cannot know what fields I should be searching for to see if those contain the content I'm looking for. 所以我不知道我应该搜索哪些字段,看看它们是否包含我正在寻找的内容。 Here I also want to integrate the field boosting, for which I haven't found yet any example. 在这里,我还想整合现场助推器,我还没有找到任何例子。

Does anyone know if the way I'm trying to do it it is a good idea, and point me into some direction? 有谁知道我是否尝试这样做是一个好主意,并指出我的方向? Whan I'm trying to find out is how I should create my query and how to access the field boosting to sort my results? 我想知道我应该如何创建查询以及如何访问字段提升以对结果进行排序?

You can boost the importance of specific fields. 您可以提高特定字段的重要性。 For example, you may want to boost the value of specific fields, such as title or abstract.Set the boost attribute of the relevant /configuration/sitecore/contentSearch/configuration/DefaultIndexConfiguration/fieldMap/fieldNames/fieldName 例如,您可能希望提升特定字段的值,例如title或abstract。设置相关/ configuration / sitecore / contentSearch / configuration / DefaultIndexConfiguration / fieldMap / fieldNames / fieldName的boost属性。

element in the Web.config file, typically specified in the /App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config Web.config include file. Web.config文件中的元素,通常在/App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config Web.config包含文件中指定。 All indexes share this configuration by default. 默认情况下,所有索引都共享此配置

And also you can boost field inside content editor on Indexing Section. 此外,您还可以在索引部分的内容编辑器中增加字段。

在此输入图像描述

Field boosting applies at indexing time 现场助推适用于索引时间

More information you can find here: 您可以在此处找到更多信息:

http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/04/sitecore-7-six-types-of-search-boosting.aspx http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/04/sitecore-7-six-types-of-search-boosting.aspx

After you set the boost value and are indexing your content use Luke to check the rank are your fields. 设置提升值并为内容建立索引后,使用Luke检查排名是否为您的字段。 My suggestion is to not use boost on fields because are not really relevant for the end user if the text they are searching is on Title or Abstract field. 我的建议是不要在字段上使用boost,因为如果他们正在搜索的文本在Title或Abstract字段上,则与最终用户不相关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM