Commit 5b8ef310 authored by Pablo Panero's avatar Pablo Panero
Browse files

jsonschemas/mapping[webservices]: add suggest field for search-as-you-type

parent 9f307718
......@@ -66,6 +66,12 @@
}
}
},
"suggest": {
"type": "array",
"items": {
"type": "string"
}
},
"promoted": {
"type": "boolean"
},
......
......@@ -7,6 +7,14 @@
"url_tokenizer": {
"type": "pattern",
"pattern": "\\.|(\\:\\/\\/)|\\/"
},
"autocomplete": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 20,
"token_chars": [
"letter"
]
}
},
"filter":{
......@@ -20,6 +28,15 @@
"type": "custom",
"tokenizer": "url_tokenizer",
"filter": ["url_stop"]
},
"autocomplete": {
"tokenizer": "autocomplete",
"filter": [
"lowercase"
]
},
"autocomplete_search": {
"tokenizer": "lowercase"
}
},
"normalizer": {
......@@ -61,6 +78,7 @@
"properties": {
"name": {
"type": "text",
"copy_to": "suggest",
"analyzer": "english",
"fields": {
"french": {
......@@ -111,6 +129,7 @@
},
"authors": {
"type": "text",
"copy_to": "suggest",
"fields": {
"exact_match": {
"type": "keyword",
......@@ -120,6 +139,11 @@
}
}
},
"suggest": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "autocomplete_search"
},
"promoted": {
"type": "boolean"
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment