(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 classpath-resources]}
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}
Or when the MapOfParams is empty then only ComponentNameKeywordOrString can be passed.
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 "."}
Short notation:
{:tokenizer :standard :char-filters [:htmlStrip] :token-filters [:uppercase]}
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}
`
Or when the MapOfParams is empty then only ComponentNameKeywordOrString can be passed.
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 "."}
`
Short notation:
`
{:tokenizer :standard
:char-filters [:htmlStrip]
:token-filters [:uppercase]}
`
`opts` map can specify these keys:
- config-dir: path to directory from which resources will be loaded, default '.'
- classpath-resources: when true and :config-dir is nil then loads resources from classpath
- 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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |