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>() {
|
||||
@Override
|
||||
public boolean publish(Amenity amenity) {
|
||||
List<String> otherNames = amenity.getAllNames(false);
|
||||
String localeName = amenity.getName(lang, false);
|
||||
if (name.equalsIgnoreCase(localeName) || otherNames.contains(name)) {
|
||||
List<String> allNames = amenity.getAllNames(false);
|
||||
for (String amenityName : allNames) {
|
||||
if (name.equalsIgnoreCase(amenityName)) {
|
||||
results.add(amenity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue