Fix #9061
This commit is contained in:
parent
108c2b5704
commit
edd10cb092
2 changed files with 3 additions and 2 deletions
|
@ -52,8 +52,9 @@ public enum ObjectType {
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case HOUSE:
|
case HOUSE:
|
||||||
case STREET_INTERSECTION:
|
case STREET_INTERSECTION:
|
||||||
return 3;
|
return 4;
|
||||||
case STREET:
|
case STREET:
|
||||||
|
return 3;
|
||||||
case POI:
|
case POI:
|
||||||
return 2;
|
return 2;
|
||||||
case CITY:
|
case CITY:
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class SearchPhrase {
|
||||||
int i1 = CommonWords.getCommonSearch(o1.toLowerCase());
|
int i1 = CommonWords.getCommonSearch(o1.toLowerCase());
|
||||||
int i2 = CommonWords.getCommonSearch(o2.toLowerCase());
|
int i2 = CommonWords.getCommonSearch(o2.toLowerCase());
|
||||||
if (i1 != i2) {
|
if (i1 != i2) {
|
||||||
return icompare(i1, i2);
|
return -icompare(i1, i2);
|
||||||
}
|
}
|
||||||
// compare length without numbers to not include house numbers
|
// compare length without numbers to not include house numbers
|
||||||
return -icompare(lengthWithoutNumbers(o1), lengthWithoutNumbers(o2));
|
return -icompare(lengthWithoutNumbers(o1), lengthWithoutNumbers(o2));
|
||||||
|
|
Loading…
Reference in a new issue