While some might ask, why would the server host IP be available as a search keyword? I only ask you hold my beer as I make it a reality.

This commit is contained in:
vlofgren 2022-07-19 03:01:23 +02:00
parent e83a7435c6
commit 64844e1db2

View File

@ -183,6 +183,10 @@ public class DocumentProcessor {
tagWords.add("proto:"+url.proto.toLowerCase());
tagWords.add("js:" + Boolean.toString(ret.features.contains(HtmlFeature.JS)).toLowerCase());
if (domain.ip != null) {
tagWords.add("ip:" + domain.ip.toLowerCase()); // lower case because IPv6 is hexadecimal
}
ret.features.stream().map(HtmlFeature::getKeyword).forEach(tagWords::add);
words.append(IndexBlock.Meta, tagWords);