-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
bf69003
commit 493f9dd
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
layout: default | ||
title: Constant keyword | ||
nav_order: 71 | ||
has_children: false | ||
parent: String field types | ||
grand_parent: Supported field types | ||
--- | ||
|
||
# Constant keyword field type | ||
|
||
A constant keyword field uses the same value for all documents in the index. | ||
|
||
When a search request spans multiple indexes, you can filter on a constant keyword field to match documents from indexes with the given constant value but not from indexes with a different value. | ||
|
||
## Example | ||
|
||
The following query creates a mapping with a constant keyword field: | ||
|
||
```json | ||
PUT romcom_movies | ||
{ | ||
"mappings" : { | ||
"properties" : { | ||
"genre" : { | ||
"value" : "Romantic comedy" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
{% include copy-curl.html %} | ||
|
||
## Parameters | ||
|
||
The following table lists the parameters accepted by constant keyword field types. All values are required. | ||
|
||
Parameter | Description | ||
:--- | :--- | ||
`value` | The string field value for all documents in the index. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters