Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #182 (new defect)

Opened 9 years ago

Last modified 9 years ago

EasySearch Index Management - Index

Reported by: oyvind@… Owned by: andyturl@…
Priority: minor Component: EasySearch
Keywords: Cc: mari@…

Description

I'm trying to boost some EPiServer properties in Easy Search.

Tried the following methods:

<property Name="CustomSearchKeyWords"
              IncludeInCommonContent="true" >
              <lucene:field Name="CustomSearchKeyWords"
          FieldStore="NO"
          FieldTermVector="NO"
          FieldIndex="TOKENIZED"
          Boost="1.2" />    
<property Name="CustomSearchKeyWords"
              IncludeInCommonContent="true" >
              <lucene:field Name="CustomSearchKeyWords"
          FieldStore="YES"
          FieldTermVector="NO"
          FieldIndex="TOKENIZED"
          Boost="1.2" />    
<property Name="CustomSearchKeyWords"
              IncludeInCommonContent="true" Boost="1.2">
           />    

I'm running a multi language site so the properties will get the _langcode (see the attachment).

Regarding which version of the above alternatives the boost setting get 1 when searching in admin. See the attachment.

We are using version 2.0.0.0.

Attachments

EasySearchBoost.png (53.7 KB) - added by oyvind@… 9 years ago.
Boost always get 1 in the result

Change History

Changed 9 years ago by oyvind@…

Boost always get 1 in the result

comment:1 Changed 9 years ago by oyvind@…

I've also downloaded the latest 2.5.0.0 version and tested with the same result. It seems like the following method is never called in SystemConfigurationReader.

 public object Create(object parent, object configContext, XmlNode section)
 - ParsePageTypes
   - ParsePageTypeProperties
     - ParsePropertyConfiguration (looks like here is the place where the boost is set)

comment:2 Changed 9 years ago by andyturl@…

The correct way to set boost is in the <lucene:field /> block. The boost is set on indexing in LuceneDocumentFactory.AddPagePropertiesToDocument().

However it looks like the Admin page is wrong in trying to showing the boost value since using GetBoost() on a Lucene Document only works when the document is created - which is before it goes into the index, otherwise that method will just return 1.0 as the boost value isn't stored but calculated.

If you want to see what the actual score is for a search on your custom fields you can try using Luke http://www.getopt.org/luke/. Also, you can set a boost on the field when you create your search query.

I'll remove the boost field so just ignore it - thanks for pointing it out.

Note: See HelpUser/Tickets for help on using tickets.