Skip to content

ElasticClient.Analyze throws exception when done with an empty text #962

Closed
@Roemer

Description

@Roemer

Calling Analyze with en empty / null value throws an Exception. I think it would be better to be able to send empty analyze requests and get an IAnalyzeResponse back with the IsValid = false and appropriate error message set instead of the exception.

Example:

var req = new AnalyzeRequest(String.Empty);
req.Indices = new IndexNameMarker[] { IndexName };
req.Field = field;
// Next line throws an exception
var analyzeResult = Client.Analyze(req);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions