简体   繁体   中英

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. 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

element in the Web.config file, typically specified in the /App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config Web.config include file. 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

After you set the boost value and are indexing your content use Luke to check the rank are your fields. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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