【发布时间】:2021-08-12 08:19:02
【问题描述】:
当我执行多词搜索(例如“番茄酱热狗”)时,尽管已在 SOLR 中为以下产品编制索引:
- 名称:番茄酱热狗
- 名称:番茄酱温和
- 名称:大热狗
SOLR 结果按以下顺序显示:
- 名称:大热狗
- 名称:番茄酱温和
- 名称:番茄酱热狗
而不是将“番茄酱热狗”放在首位,因为它是完全匹配的。
我目前的配置是:
Free text Search:
INSERT_UPDATE SolrSearchQueryProperty; indexedProperty(name, solrIndexedType(identifier))[unique = true]; searchQueryTemplate(name, indexedType(identifier))[unique = true][default = DEFAULT:$solrIndexedType]; ftsQuery[default = false]; ftsQueryBoost; ftsQueryMinTermLength[default = 2];
; name:$solrIndexedType ; ; TRUE ; 1000 ; ;
; description:$solrIndexedType ; ; ; ; ;
; summary:$solrIndexedType ; ; ; ; ;
; manufacturerName:$solrIndexedType ; ; TRUE ; 40 ; ;
; manufacturerAID:$solrIndexedType ; ; TRUE ; 100 ; ;
; brandName:$solrIndexedType ; ; TRUE ; 800 ; ;
; categoryName:$solrIndexedType ; ; ; ; ;
; allCategories:$solrIndexedType ; ; ; ; ;
; category:$solrIndexedType ; ; ; ; ;
; brand:$solrIndexedType ; ; TRUE ; 800 ; ;
Fuzzy Search:
INSERT_UPDATE SolrSearchQueryProperty; indexedProperty(name, solrIndexedType(identifier))[unique = true]; searchQueryTemplate(name, indexedType(identifier))[unique = true][default = DEFAULT:$solrIndexedType]; ftsFuzzyQuery[default = false]; ftsFuzzyQueryBoost; ftsFuzzyQueryMinTermLength[default = 2]; ftsFuzzyQueryFuzziness[default = 1];
; name:$solrIndexedType ; ; TRUE ; 100 ; ; ;
; description:$solrIndexedType ; ; ; ; ; ;
; summary:$solrIndexedType ; ; ; ; ; ;
; manufacturerName:$solrIndexedType ; ; ; ; ; ;
; manufacturerAID:$solrIndexedType ; ; ; ; ; ;
; brandName:$solrIndexedType ; ; TRUE ; 80 ; ; ;
; categoryName:$solrIndexedType ; ; ; ; ; ;
; allCategories:$solrIndexedType ; ; ; ; ; ;
; category:$solrIndexedType ; ; ; ; ; ;
; brand:$solrIndexedType ; ; TRUE ; 80 ; ; ;
Phrase Search:
INSERT_UPDATE SolrSearchQueryProperty; indexedProperty(name, solrIndexedType(identifier))[unique = true]; searchQueryTemplate(name, indexedType(identifier))[unique = true][default = DEFAULT:$solrIndexedType]; ftsPhraseQuery[default = false]; ftsPhraseQueryBoost; ftsPhraseQuerySlop[default = 6];
; name:$solrIndexedType ; ; TRUE ; 1500 ; ;
; description:$solrIndexedType ; ; ; ; ;
; summary:$solrIndexedType ; ; ; ; ;
; manufacturerName:$solrIndexedType ; ; ; 80 ; ;
; manufacturerAID:$solrIndexedType ; ; ; ; ;
; brandName:$solrIndexedType ; ; TRUE ; 1000 ; ;
; categoryName:$solrIndexedType ; ; ; ; ;
; allCategories:$solrIndexedType ; ; ; ; ;
; category:$solrIndexedType ; ; ; ; ;
; brand:$solrIndexedType ; ; TRUE ; 1000 ; ;
Wildcard Query
INSERT_UPDATE SolrSearchQueryProperty; indexedProperty(name, solrIndexedType(identifier))[unique = true]; searchQueryTemplate(name, indexedType(identifier))[unique = true][default = DEFAULT:$solrIndexedType]; ftsWildcardQuery[default = false]; ftsWildcardQueryType(code)[default = POSTFIX]; ftsWildcardQueryBoost; ftsWildcardQueryMinTermLength[default = 2];
; name:$solrIndexedType ; ; TRUE ; ; 10 ; ;
; description:$solrIndexedType ; ; ; ; 0 ; ;
; summary:$solrIndexedType ; ; ; ; 0 ; ;
; manufacturerName:$solrIndexedType ; ; ; ; 0 ; ;
; manufacturerAID:$solrIndexedType ; ; ; ; 0 ; ;
; brandName:$solrIndexedType ; ; TRUE ; ; 40 ; ;
; categoryName:$solrIndexedType ; ; ; ; 0 ; ;
; allCategories:$solrIndexedType ; ; ; ; 0 ; ;
; category:$solrIndexedType ; ; ; ; 0 ; ;
; brand:$solrIndexedType ; ; TRUE ; ; 45 ; ;
为了实现更准确的多词搜索,我必须修改哪些参数?
【问题讨论】:
标签: solr hybris solrcloud hybris-data-hub