Skip to content

Commit

Permalink
Classic factor is in diff field
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Apr 8, 2019
1 parent 36033b2 commit 83ff716
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
if (first && getConfigVal("aqp.classic_scoring.modifier", "") != "") {
// TODO: i don't want to make the source field be changed with URL params
// but i'd like it to be configurable
node = new AqpAdsabsScoringQueryNode(node, "classic_factor", Float.parseFloat(getConfigVal("aqp.classic_scoring.modifier")));
node = new AqpAdsabsScoringQueryNode(node, "cite_read_boost", Float.parseFloat(getConfigVal("aqp.classic_scoring.modifier")));
}
first = false;
return node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ public void testCustomScoring() throws Exception {
BooleanQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "abs:\"dark energy\"",
"aqp.classic_scoring.modifier", "0.6"),
"custom((abstract:\"dark energy\" | Synonym(abstract:syn::acr::de abstract:syn::dark energy)) (title:\"dark energy\" | Synonym(title:syn::acr::de title:syn::dark energy)) (keyword:\"dark energy\" | Synonym(keyword:syn::acr::de keyword:syn::dark energy)), sum(float(classic_factor),const(0.6)))",
"custom((abstract:\"dark energy\" | Synonym(abstract:syn::acr::de abstract:syn::dark energy)) (title:\"dark energy\" | Synonym(title:syn::acr::de title:syn::dark energy)) (keyword:\"dark energy\" | Synonym(keyword:syn::acr::de keyword:syn::dark energy)), sum(float(cite_read_boost),const(0.6)))",
CustomScoreQuery.class);

// TODO: params get passed recursively, not what we want in this case
Expand Down

0 comments on commit 83ff716

Please sign in to comment.