Skip to content

Any documentation about sorting ? can't have it built ... #12

Description

@jrouaix

Well, hello there,
I'm so sorry to ask this question but I can find a documentation or example for a sort and it doesn't compile like that :

 let s = Sort {
    field: "field".to_owned(),
    mode: None,
    order: Some(SortOrder::Asc),
  };
error[E0451]: field `field` of struct `elastiql::search::Sort` is private
    |
219 |     field: "field".to_owned(),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ private field

error[E0451]: field `mode` of struct `elastiql::search::Sort` is private
    |
220 |     mode: None,
    |     ^^^^^^^^^^ private field

error[E0451]: field `order` of struct `elastiql::search::Sort` is private
    |
221 |     order: Some(SortOrder::Asc),
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ private field

Could you provide an example on how to construct the sorting value here ?

    let request = Request::builder()
      .query(query)
      .sort(sorting) // <- this one
      .build();

please help :-/

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