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

Expected struct HitsTotal (pre-release) #410

Open
brigand opened this issue Jan 25, 2020 · 0 comments
Open

Expected struct HitsTotal (pre-release) #410

brigand opened this issue Jan 25, 2020 · 0 comments

Comments

@brigand
Copy link

brigand commented Jan 25, 2020

This seems closely related to #377 but opening a new issues as that one is closed.

Getting "expected struct HitsTotal" issue with this on elasticsearch 6.7 (and the following versions for both elastic and elastic_derive crates).

  • 0.21.0-pre.2 ☑️ Good
  • 0.21.0-pre.3 ☑️ Good
  • 0.21.0-pre.4 ☑️ Good
  • 0.21.0-pre.5 ❌ Regression
(Parse(ParseError { inner: Error(\"invalid type: integer `0`, expected struct HitsTotal\", line: 11, column: 16) }))
Relevant code
#[derive(Clone, Debug, Serialize, Deserialize, ElasticType)]
pub struct PortfolioIdListing {
    pub id: String,
    pub idlisting: types::IdListing,
}

let response = esc
    .search::<es_models::PortfolioIdListing>()
    .index(EsIndex::Portfolio.name())
    .body(json!({
        "query": {
            "bool": {
                "must": {
                        // -1 is what the JS import script sets them to by default
                    "term": { "pf_likes": -1 },
                },
                "must_not": {
                    "terms": { "idlisting": exclude },
                },
            }
        },
        "size": Value::Number(BATCH_SIZE.into()),
        "_source": ["id", "idlisting"]
    }))
    .send()
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

1 participant