rs-es icon indicating copy to clipboard operation
rs-es copied to clipboard

Search return a json error

Open 2phost opened this issue 5 years ago • 1 comments

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

2phost avatar May 28 '19 13:05 2phost

I meet this error also! @benashford

tanhaipeng avatar Sep 16 '19 09:09 tanhaipeng