It is possible to manually create a custom analyzer without the type property explicitly specified. Attempting to deserialize this with the client such as when retrieving the index with client.indices.get() it will fail due to no type property. The server's logic is that type must be specified unless tokenizer is specified in which case type: "custom" is assumed.
How can one reproduce the bug?
Create an index with a custom analyzer in Dev Tools:
What is the bug?
It is possible to manually create a custom analyzer without the
type
property explicitly specified. Attempting to deserialize this with the client such as when retrieving the index withclient.indices.get()
it will fail due to notype
property. The server's logic is thattype
must be specified unlesstokenizer
is specified in which casetype: "custom"
is assumed.How can one reproduce the bug?
client.indices().get(b -> b.index("custom-analyzer-index"))
What is the expected behavior?
Analyzer to successfully deserialize as a
CustomAnalyzer
.