Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search return a json error #135

Open
2phost opened this issue May 28, 2019 · 1 comment
Open

Search return a json error #135

2phost opened this issue May 28, 2019 · 1 comment

Comments

@2phost
Copy link

2phost commented May 28, 2019

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

@tanhaipeng
Copy link

tanhaipeng commented Sep 16, 2019

I meet this error also! @benashford

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants