(converter) Use the prefix ip: instead of geopip: for country codes

This is the same as the prefix for the IP address, but I don't think that substantially matters, the as two have such different namespaces there can be no confusion.
This commit is contained in:
Viktor Lofgren 2023-12-11 13:59:23 +01:00
parent f655ec5a5c
commit 30bc3f9281

View File

@ -49,12 +49,11 @@ public class DomainProcessor {
this.anchorTagsSource = anchorTagsSourceFactory.create();
this.geoIpDictionary = geoIpDictionary;
geoIpDictionary.waitReady();
}
@SneakyThrows
public ProcessedDomain process(SerializableCrawlDataStream dataStream) {
geoIpDictionary.waitReady();
var ret = new ProcessedDomain();
List<ProcessedDocument> docs = new ArrayList<>();
@ -116,9 +115,9 @@ public class DomainProcessor {
terms.add("ip:"+ip);
String geoIp = geoIpDictionary.getCountry(ip);
if (!geoIp.isBlank()) {
terms.add("geoip:"+geoIp.toLowerCase());
String ipCountryCode = geoIpDictionary.getCountry(ip).toLowerCase();
if (!ipCountryCode.isBlank()) {
terms.add("ip:"+ipCountryCode);
}
if (cookies) {