Update search result

This commit is contained in:
Victor Shcherb 2021-04-23 17:33:03 +02:00
parent 3db30ffe8d
commit 41c812903a

View file

@ -76,7 +76,6 @@ public class SearchResult {
}
int idxMatchedWord = -1;
boolean allWordsMatched = true;
if (!checkPhraseIsObjectType()) {
for (int i = 0; i < searchPhraseNames.size(); i++) {
boolean wordMatched = false;
for (int j = idxMatchedWord + 1; j < localResultNames.size(); j++) {
@ -92,7 +91,6 @@ public class SearchResult {
break;
}
}
}
double res = ObjectType.getTypeWeight(allWordsMatched ? objectType : null);
if (parentSearchResult != null) {
res = res + parentSearchResult.getSumPhraseMatchWeight() / MAX_TYPE_WEIGHT;
@ -100,16 +98,6 @@ public class SearchResult {
return res;
}
private boolean checkPhraseIsObjectType() {
// if (object instanceof Amenity) {
// String poiType = ((Amenity) object).getType().getKeyName();
// String poiSubType = ((Amenity) object).getSubType();
// boolean isType = poiType.equalsIgnoreCase(phrase);
// boolean isSubType = poiSubType.equalsIgnoreCase(phrase);
// return isType || isSubType;
// }
return false;
}