mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 06:55:32 +00:00
Together with types removal, any mention of "fields with the same name in the same index" doesn't make sense anymore. (cherry picked from commit c5190106cbd4c007945156249cce462956933326)
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
[[norms]]
|
|
=== `norms`
|
|
|
|
Norms store various normalization factors that are later used at query time
|
|
in order to compute the score of a document relatively to a query.
|
|
|
|
Although useful for scoring, norms also require quite a lot of disk
|
|
(typically in the order of one byte per document per field in your index, even
|
|
for documents that don't have this specific field). As a consequence, if you
|
|
don't need scoring on a specific field, you should disable norms on that
|
|
field. In particular, this is the case for fields that are used solely for
|
|
filtering or aggregations.
|
|
|
|
TIP: Norms can be disabled on existing fields using
|
|
the <<indices-put-mapping,PUT mapping API>>.
|
|
|
|
Norms can be disabled (but not reenabled after the fact), using the
|
|
<<indices-put-mapping,PUT mapping API>> like so:
|
|
|
|
[source,js]
|
|
------------
|
|
PUT my_index/_mapping
|
|
{
|
|
"properties": {
|
|
"title": {
|
|
"type": "text",
|
|
"norms": false
|
|
}
|
|
}
|
|
}
|
|
------------
|
|
// CONSOLE
|
|
// TEST[s/^/PUT my_index\n/]
|
|
|
|
NOTE: Norms will not be removed instantly, but will be removed as old segments
|
|
are merged into new segments as you continue indexing new documents. Any score
|
|
computation on a field that has had norms removed might return inconsistent
|
|
results since some documents won't have norms anymore while other documents
|
|
might still have norms.
|