Changeset View
Changeset View
Standalone View
Standalone View
swh/search/elasticsearch.py
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | "dynamic_templates": [ | ||||
{ | { | ||||
"booleans_as_string": { | "booleans_as_string": { | ||||
# All fields stored as string in the metadata | # All fields stored as string in the metadata | ||||
# even the booleans | # even the booleans | ||||
"match_mapping_type": "boolean", | "match_mapping_type": "boolean", | ||||
"path_match": "intrinsic_metadata.*", | "path_match": "intrinsic_metadata.*", | ||||
"mapping": {"type": "keyword"}, | "mapping": {"type": "keyword"}, | ||||
} | } | ||||
}, | |||||
{ | |||||
"floats_as_string": { | |||||
# All fields stored as string in the metadata | |||||
# even the floats | |||||
"match_mapping_type": "double", | |||||
"path_match": "intrinsic_metadata.*", | |||||
"mapping": {"type": "text"}, | |||||
} | |||||
}, | |||||
{ | |||||
"longs_as_string": { | |||||
# All fields stored as string in the metadata | |||||
anlambert: even the longs | |||||
# even the longs | |||||
"match_mapping_type": "long", | |||||
"path_match": "intrinsic_metadata.*", | |||||
"mapping": {"type": "text"}, | |||||
} | } | ||||
}, | |||||
], | ], | ||||
"date_detection": False, | "date_detection": False, | ||||
"properties": { | "properties": { | ||||
# sha1 of the URL; used as the document id | # sha1 of the URL; used as the document id | ||||
"sha1": { | "sha1": { | ||||
"type": "keyword", | "type": "keyword", | ||||
"doc_values": True, | "doc_values": True, | ||||
}, | }, | ||||
▲ Show 20 Lines • Show All 523 Lines • Show Last 20 Lines |
even the longs