Skip to content

Instantly share code, notes, and snippets.

{
"_index": "person",
"_id": "rcHRX5MBJ7dnwkKAHKZt",
"_version": 1,
"found": true,
"took": 0,
"term_vectors": {
"name": {
"terms": {
"donald": {
GET person/_termvectors/rcHRX5MBJ7dnwkKAHKZt
{
"fields": ["name"],
"field_statistics": false,
"positions": false,
"offsets": false
}
{
"tokens": [
{
"token": "mickei",
"start_offset": 0,
"end_offset": 6,
"type": "<ALPHANUM>",
"position": 0
},
{
POST person/_analyze
{
"analyzer": "english",
"text": "Mickey baking breads"
}
POST person/_doc
{
"name": "Donald Fauntleroy Duck",
"email": "dONALD_the_DUCk@quackmail.com"
}
PUT person/_mapping
{
"properties": {
"email": {
"type": "keyword",
"normalizer": "lowercase"
}
}
}
{
"tokens": [
{
"token": "mickey",
"start_offset": 0,
"end_offset": 6,
"type": "<ALPHANUM>",
"position": 0
},
{
POST person/_analyze
{
"analyzer": "standard",
"text": "Mickey!! MOUSE"
}
"hits": [
{
"_index": "person",
"_id": "1",
"_score": 1.5408845,
"_source": {
"name": "Mickey Mouse",
...
}
},
GET person/_search
{
"explain": true,
"query": {
"match": {
"name": "Mickey Mouse"
}
}
}