Try to fix #9329
This commit is contained in:
parent
f1c7d7e276
commit
aa56153a53
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ public class SearchResult {
|
||||||
public double getSumPhraseMatchWeight() {
|
public double getSumPhraseMatchWeight() {
|
||||||
// if result is a complete match in the search we prioritize it higher
|
// if result is a complete match in the search we prioritize it higher
|
||||||
boolean match = requiredSearchPhrase.countWords(localeName) <= getSelfWordCount();
|
boolean match = requiredSearchPhrase.countWords(localeName) <= getSelfWordCount();
|
||||||
double res = match ? ObjectType.getTypeWeight(objectType) : 0;
|
double res = ObjectType.getTypeWeight(match ? objectType : null);
|
||||||
if (parentSearchResult != null) {
|
if (parentSearchResult != null) {
|
||||||
res = res + parentSearchResult.getSumPhraseMatchWeight() / MAX_TYPE_WEIGHT;
|
res = res + parentSearchResult.getSumPhraseMatchWeight() / MAX_TYPE_WEIGHT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue