Merge branch 'r3.7'

This commit is contained in:
Victor Shcherb 2020-05-24 19:41:42 +02:00
commit 7de6ff0bf5
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));