1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use Serialize;
use crate;
use ;
/// A fully-resolved mapping for one index: every field typed and ready for a
/// sink to translate into its native mapping format.
///
/// A source produces this from the [`IndexSchema`](super::IndexSchema) — using
/// each field's explicit [`Mapping`] where one is given, and the database's own
/// column types where it is not. The result has a
/// concrete type for every field, which is what a sink needs to create the
/// index up front rather than leaving the destination to guess.
/// One field within an [`IndexMapping`]: the document key it lands under, its
/// resolved [`Mapping`] (the `mapping_type` is always present), whether the
/// value can be null, and the fields nested under it for `object` / `nested`
/// types.