商业搜索似乎没有适当地加权标题 [英] Commerce search doesn't seem to be weighting the title appropriately

查看:52
本文介绍了商业搜索似乎没有适当地加权标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 您好,

我正在使用commerceserver 2009 API搜索商业服务器目录。我得到了相应的结果,但我在排序搜索结果时面临问题。我正在基于FreeTextSearch_Rank进行排序。出于某种原因,商业搜索似乎没有
适当地加权标题。例如,如果您搜索电话或遥控器,则最常见的结果在标题中没有这些关键字,但在结果集中您可以找到相应的产品。但是,说明中包含关键字。 它
看起来像它的重量描述而不是标题。能告诉我如何让它成为标题。请在下面找到我的代码

I am using commerceserver 2009 APIs to search commerce server catalog. I am getting the appropriate results but I facing issue in sorting the search results. I am sorting based on FreeTextSearch_Rank. for some reason commerce search doesn't seem to be weighting the title appropriately. For example if you search for telephone or remote control, the top results don't have those keywords in the title but further down the resultset you find products that do. However the description contains the keywords. It looks like its weighting the description rather than the title. Can you please let me know how to make it to waight title. Please find my code below

 

 

 

CatalogContext catalogContext =
CommerceContext 。Current.CatalogSystem;

CatalogContext catalogContext = CommerceContext.Current.CatalogSystem;

 

//搜索目录。

 

//创建搜索选项。

 

CatalogSearchOptions searchOptions =
new
CatalogSearchOptions ();

CatalogSearchOptions searchOptions = new CatalogSearchOptions();

searchOptions.PropertiesToReturn =

searchOptions.PropertiesToReturn =

 

" CategoryName,ProductId,Description,VariantId,DisplayName,cy_list_price,Image_filename,SellEndDate,SellStartDate,BrowseStartDate,BrowseEndDate,SAGENumber,
OnSale,FreeTextSearch_Rank"
;

"CategoryName, ProductId, Description, VariantId, DisplayName, cy_list_price, Image_filename, SellEndDate, SellStartDate, BrowseStartDate, BrowseEndDate, SAGENumber, OnSale, FreeTextSearch_Rank";

 

// searchOptions.SetPaging(1,20);

searchOptions.SortProperty =

searchOptions.SortProperty =

" FreeTextSearch_Rank" ;

"FreeTextSearch_Rank";

searchOptions.SortDescending =

searchOptions.SortDescending =

true ;

true;

 

//以避免在搜索结果中显示变量。

searchOptions.ClassTypes =

searchOptions.ClassTypes =

CatalogClassTypes .CroductClass |
CatalogClassTypes 。CategoryClass |

CatalogClassTypes.ProductClass | CatalogClassTypes.CategoryClass |

 

CatalogClassTypes 。ProductFamilyClass;

 

CatalogSearch catalogSearch = catalogContext.GetCatalogSearch();

CatalogSearch catalogSearch = catalogContext.GetCatalogSearch();

 

< span style ="color:#008000; font-size:x-small"> //指定要搜索的目录。

 

//这是一个以逗号分隔的待搜索目录列表,

 

//例如,"Catalog1,catalog2"。

catalogSearch.CatalogNames =" catalog1";

catalogSearch.CatalogNames = "catalog1";

catalogSearch.SearchOptions = searchOptions;

catalogSearch.SearchOptions = searchOptions;

catalogItems = catalogSearch.Search(

catalogItems = catalogSearch.Search(

out totalRecords);

out totalRecords);

 

 

 

 

推荐答案

您上面粘贴的代码是使用商业服务器运行时API(不是CS2009 MCF)。您可以使用e自由文本搜索以搜索可搜索属性值中的单词和短语,并检索目录中属性的所有实例。
据我所知,商业服务器和SQL服务器全文目录中没有权重概念(OOB)。

The code you pasted above is using commerce server runtime API (not CS2009 MCF).  You can use the free-text search to search for words and phrases in the values of searchable properties and it retrieves all instances of the property in your catalog. As per my knowledge, there is no weightage concept (OOB) in commerce server nor in SQL server full text catalog.

问候,

- Ravi Kanth Koppala

Regards,
-Ravi Kanth Koppala


这篇关于商业搜索似乎没有适当地加权标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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