Update search result
This commit is contained in:
parent
3db30ffe8d
commit
41c812903a
1 changed files with 12 additions and 24 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue