Improved amenity matcher for wiki articles
This commit is contained in:
parent
7959a2fb66
commit
8fc7e8d304
1 changed files with 6 additions and 4 deletions
|
@ -129,10 +129,12 @@ public class WikiArticleHelper {
|
||||||
ResultMatcher<Amenity> matcher = new ResultMatcher<Amenity>() {
|
ResultMatcher<Amenity> matcher = new ResultMatcher<Amenity>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean publish(Amenity amenity) {
|
public boolean publish(Amenity amenity) {
|
||||||
List<String> otherNames = amenity.getAllNames(false);
|
List<String> allNames = amenity.getAllNames(false);
|
||||||
String localeName = amenity.getName(lang, false);
|
for (String amenityName : allNames) {
|
||||||
if (name.equalsIgnoreCase(localeName) || otherNames.contains(name)) {
|
if (name.equalsIgnoreCase(amenityName)) {
|
||||||
results.add(amenity);
|
results.add(amenity);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue