This commit is contained in:
Victor Shcherb 2020-05-24 19:41:23 +02:00
parent 108c2b5704
commit edd10cb092
2 changed files with 3 additions and 2 deletions

View file

@ -52,8 +52,9 @@ public enum ObjectType {
switch (t) {
case HOUSE:
case STREET_INTERSECTION:
return 3;
return 4;
case STREET:
return 3;
case POI:
return 2;
case CITY:

View file

@ -121,7 +121,7 @@ public class SearchPhrase {
int i1 = CommonWords.getCommonSearch(o1.toLowerCase());
int i2 = CommonWords.getCommonSearch(o2.toLowerCase());
if (i1 != i2) {
return icompare(i1, i2);
return -icompare(i1, i2);
}
// compare length without numbers to not include house numbers
return -icompare(lengthWithoutNumbers(o1), lengthWithoutNumbers(o2));