0

私のスキーマは以下のようなものです

<fields>   
    <field name="ProductId" type="int" indexed="true" stored="true" />    
    <field name="ProductName" type="string" indexed="true" stored="true" required="true" />
    <field name="ProductDesription" type="string" indexed="true" stored="true" required="true" />
    <field name="ProductRating" type="int" indexed="true" stored="true" required="true" />
</fields>

製品名は q パラメータとして solr に渡されます。クエリ パラメータとして渡されない「ProductRating」に基づいてスコアに影響を与える方法はありますか?

または、solr ソース コードに移動してランキング アルゴリズムを変更する必要がありますか?

ガイドしてください。

前もって感謝します

4

2 に答える 2

1

で並べ替えたい場合はProductRating、次のように別のクエリ パラメータを追加 するか、関数クエリで使用してスコアに影響を与えるq=ProductName:book&sort=ProductRating descことができます。ProductRating

于 2013-02-08T01:41:49.903 に答える
0

製品評価に基づいて結果を高めることができます。

Boost Scoreなどを確認します。または、Dismax パーサーを使用している場合は、パラメータBoost Queryを確認します。

あなたの状態のためにあなたが試すことができますbq=ProductRating^2.0

おそらく、製品名と製品タイプのブーストの組み合わせを使用して、別の重み付けで適切な結果を取得し、検索を考慮する必要があります。

于 2013-02-08T05:16:17.490 に答える