Non-prefix-based Completion Suggester in Elasticsearch -


i have mapping type follows:

{   "mappings": {     "book": {       "properties": {         "title": {           "type": "completion"         }       }     }   } } 

and index data:

{"create": {"_index": "library", "_type": "book", "_id": 1}} {"id": 1, "title": "c++ how program"} 

my question how document id 1 of type book if query this:

post /library/book/_search {     "suggest": {         "book-suggest": {             "text": "program c++",             "completion": {                 "field": "title"             }         }     } } 


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -