junh-ki / elasticsearch

Elasticsearch Python Client Examples
0 stars 1 forks source link

elasticsearch #6

Open junh-ki opened 3 years ago

junh-ki commented 3 years ago
Field Types: String, byte, short, integer, long, float, double, boolean, date ``` "properties": { "user_id": { "type": "long" } } ``` Field Index: Do you want this field indexed for full-text search? analyzed / not_analyzed / no ``` "properties": { "genre": { "index": "not_analyzed" } } ``` Field Analyzer: Define your tokenizer and token filter. standard / whitespace / simple / english etc. ``` "properties": { "description": { "analyzer": "english" } } ```
junh-ki commented 3 years ago

Insert

curl -XPUT
127.0.0.1:9200/movies/_doc/109487 -d '
{
    "genre": ["IMAX", "Sci-Fi"],
    "title": "Interstellar",
    "year": 2014
}'