(char-filter-factories)
Returns a map of available char filter factories: <String, Class>
Returns a map of available char filter factories: <String, Class>
(create opts)
(create {:keys [config-dir char-filters tokenizer token-filters namify-fn
position-increment-gap offset-gap]}
char-filter-factories
tokenizer-factories
token-filter-factories)
Constructs a Lucene Analyzer using the CustomAnalyzer builder. Under the hood it uses the factory classes TokenizerFactory, TokenFilterFactory, and CharFilterFactory. The factories are loaded with java.util.ServiceLoader.
Analysis component description is of shape:
{ComponentNameKeywordOrString MapOfParams}
If needed factories can be passed as arguments in shape:
{STRING CLASS}
Example:
{:tokenizer {"standard" {:maxTokenLength 4}} :char-filters [{"patternReplace" {:pattern "foo", :replacement "foo"}}] :token-filters [{"uppercase" nil} {"reverseString" nil}] :config-dir "."}
opts
map can specify these keys:
Constructs a Lucene Analyzer using the CustomAnalyzer builder. Under the hood it uses the factory classes TokenizerFactory, TokenFilterFactory, and CharFilterFactory. The factories are loaded with java.util.ServiceLoader. Analysis component description is of shape: ` {ComponentNameKeywordOrString MapOfParams} ` If needed factories can be passed as arguments in shape: ` {STRING CLASS} ` Example: ` {:tokenizer {"standard" {:maxTokenLength 4}} :char-filters [{"patternReplace" {:pattern "foo", :replacement "foo"}}] :token-filters [{"uppercase" nil} {"reverseString" nil}] :config-dir "."} ` `opts` map can specify these keys: - config-dir: path to directory from which resources will be loaded, default '.' - char-filters: list of char filter descriptions - tokenizer: tokenizer description, default 'standard' tokenizer - token-filters: list of token filter descriptions - position-increment-gap: specify position increment gap - offset-gap: specify offset gap - namify-fn: function that changes the string identifier of the service name, e.g. str/lowercase, default: identity
(get-component-or-exception factories component-name component-type namify-fn)
(token-filter-factories)
Returns a map of available token filter factories: <String, Class>
Returns a map of available token filter factories: <String, Class>
(tokenizer-factories)
Returns a map of available tokenizer factories: <String, Class>
Returns a map of available tokenizer factories: <String, Class>
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close