来自抓取的显式特殊字符

Explicit special characters from crawling

正在使用 Storm Crawler 1.13 和 elastic search 6.5.2。如何限制爬虫不crawl/index特殊字符� � � � � ��� �� � •

一个简单的方法是写一个像

这样的 ParseFilter
        ParseData pd = parse.get(URL);
        String text = pd.getText();
        // remove chars
        pd.setText(text);

这将在 JSoup 或 Tika 解析的文档上被调用。 查看存储库中的解析过滤器以获取示例。