Hui v0.5.0 Hui.F.Interval View Source

Struct and functions related to interval faceting parameters.

Link to this section Summary

Types

t()

Use this struct to specify interval faceting parameters in conjunction with the main t:Hui.F.t/0 struct

Link to this section Types

Link to this type t() View Source
t() :: %Hui.F.Interval{
  interval: binary(),
  "interval.set": binary() | [binary()],
  per_field: boolean()
}

Use this struct to specify interval faceting parameters in conjunction with the main t:Hui.F.t/0 struct.

Example

iex> x = %Hui.F.Interval{interval: "price", "interval.set": ["[0,10]", "(10,100]"]}
%Hui.F.Interval{
  interval: "price",
  "interval.set": ["[0,10]", "(10,100]"],
  per_field: false
}
iex> %Hui.F{interval: x, field: ["type", "year"]}
%Hui.F{
  contains: nil,
  "contains.ignoreCase": nil,
  "enum.cache.minDf": nil,
  excludeTerms: nil,
  exists: nil,
  facet: true,
  field: ["type", "year"],
  interval: %Hui.F.Interval{
    interval: "price",
    "interval.set": ["[0,10]", "(10,100]"],
    per_field: false
  },
  limit: nil,
  matches: nil,
  method: nil,
  mincount: nil,
  missing: nil,
  offset: nil,
  "overrequest.count": nil,
  "overrequest.ratio": nil,
  pivot: [],
  "pivot.mincount": nil,
  prefix: nil,
  query: [],
  range: nil,
  sort: nil,
  threads: nil
}