Skip to content

Search return a json error #135

@2phost

Description

@2phost

I just used the following example:

let result = es_client.search_query()
        .with_indexes(&["client-lists"])
        .with_query(&Query::build_match("domain", domain).build())
        .send::<String>();
    println!("{:?}", result);

When there are no results, it returns the expected json:

Ok(SearchResult { took: 5, timed_out: false, shards: ShardCountResult { total: 1, successful: 1, failed: 0 }, hits: SearchHitsResult { total: 0, hits: [] }, aggs: None, scroll_id: None })

but when there are results, for some reason it gives me the following error:

Err(JsonError(Error("invalid type: map, expected a string", line: 1, column: 240)))

Edited: Examples updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions