Sorry, I should also explain the problem ;-) For both of the searches I'm getting the following:
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0}, "hits":{"total":0,"max_score":null,"hits":[]}} On Sunday, February 1, 2015 at 11:12:55 AM UTC-6, Craig Ching wrote: > > Hi, > > I'm trying to implement the "search as you type" example from > http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_index_time_search_as_you_type.html > > Can someone see what I'm doing wrong? > > curl -XDELETE localhost:9200/my_index > echo > curl -XPUT localhost:9200/my_index -d ' > { > "settings": { > "number_of_shards": 1, > "analysis": { > "filter": { > "autocomplete_filter": { > "type": "edge_ngram", > "min_gram": 1, > "max_gram": 20 > } > }, > "analyzer": { > "autocomplete": { > "type": "custom", > "tokenizer": "standard", > "filter": [ > "lowercase", > "autocomplete_filter" > ] > } > } > } > } > }' > echo > curl -XPUT localhost:9200/my_index/_mapping/my_type -d ' > { > "my_type": { > "properties": { > "name": { > "type": "string", > "analyzer": "autocomplete" > } > } > } > }' > echo > curl localhost:9200/my_index/my_type/_bulk -d ' > { "index": { "_id": 1 }} > { "name": "Brown foxes" } > { "index": { "_id": 2 }} > { "name": "Yellow furballs" } > ' > echo > curl localhost:9200/my_index/my_type/_search -d ' > { > "query": { > "match": { > "name": "brown fo" > } > } > }' > echo > curl localhost:9200/my_index/my_type/_validate/query?explain -d ' > { > "query": { > "match": { > "name": "brown fo" > } > } > }' > echo > curl localhost:9200/my_index/my_type/_search -d ' > { > "query": { > "match": { > "name": { > "query": "brown fo", > "analyzer": "standard" > } > } > } > }' > echo > curl localhost:9200/my_index/my_type/_validate/query?explain -d ' > { > "query": { > "match": { > "name": { > "query": "brown fo", > "analyzer": "standard" > } > } > } > }' > echo > > > > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ce82bc0d-e0a4-485f-bdec-09b93a7456fb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.