lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tballison <>
Subject [GitHub] lucene-solr issue #328: SOLR-12034
Date Mon, 01 Oct 2018 18:03:23 GMT
Github user tballison commented on the issue:
    Wow...long time since I've visited this code.  Now I think I recall...the ugliness that
I don't like imposing on the CustomAnalyzer's API is that it holds its own ResourceLoader
and applies it when the user calls, e.g. `withTokenizer(class/classname, params)`, `add(Token|Char)Filter(class/classname,
    In Solr, the charfilter, tokenizer, tokenfilter factories are fully built with resources
loaded by `FieldTypePluginLoader`'s  `loader` a (`SolrResourceLoader`) in `readAnalyzer(Node
node)` one by one...I think (???), and _then_ they are added to the `CustomAnalyzer`.
    I also see in `ManagedIndexSchema`, that there's `postReadInform()` which calls `informResourceLoaderAwareObjectsInChain`,
which then loads the resources.
    So, when I break the API in CustomAnalyzer and make public, e.g. `addTokenFilter(TokenFilterFactory
factory)`, there's an unused private variable `ResourceLoader loader`, which feels ugly...a
user could both specify a resource loader in `Builder`'s initializer and then pass in fully
loaded components that would bypass that resource loader.  This smells bad to me...
    Any recommendations?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message