AnalyzerOptions
Common contract for every analyzer definition consumable by {@see \oihana\arango\clients\Database::createAnalyzer()} and {@see Analyzer::create()}.
Implementations are expected to be immutable value objects whose
single responsibility is to serialise the type-specific fragment
of a POST /_api/analyzer body — namely the type discriminator
and the properties wrapper. The name and features fields are
carried by the caller, not by the value object.
Example implementations: IdentityAnalyzer, TextAnalyzer, NormAnalyzer, StemAnalyzer.
Tags
Table of Contents
Methods
- toArray() : array<string, mixed>
- Returns the `{ type, properties }` fragment of a `POST /_api/analyzer` body corresponding to this analyzer definition.
Methods
toArray()
Returns the `{ type, properties }` fragment of a `POST /_api/analyzer` body corresponding to this analyzer definition.
public
toArray() : array<string, mixed>
Implementations MUST set the type field (typically through
AnalyzerType) and
MAY set the properties field. When properties is omitted
the server applies its built-in defaults for the given
analyzer type.