Oh. My bad! Sorry. I misread your JSON. BTW I see that you solve yourself your problem on StackOverFlow.
-- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs Le 4 janv. 2013 à 23:21, "C. Benson Manica" <cbman...@gmail.com> a écrit : Do I have to do it that way, i.e. POST a separate settings payload to that url? You can see that I attempted - per various bits of documentation - to do it in the mappings section above. On Fri, Jan 4, 2013 at 2:01 PM, David Pilato <da...@pilato.fr> wrote: > Did you define mappings for your docs and fields to use that analyzer? > See: > http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html > > -- > David ;-) > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > > > Le 4 janv. 2013 à 22:30, "C. Benson Manica" <cbman...@gmail.com> a écrit : > > I have been Googling for an hour with no success whatsoever about how to > configure Lucene (Elasticsearch, actually, but presumably the same deal) to > index edge ngrams for typeahead. I don't really know how filters, > analyzers, and tokenizers work together - documentation isn't helpful on > that count either - but I managed to cobble together the following > configuration that I thought would work. It doesn't, though - when I index > documents into the collection with that setting, they still only match > whole words instead of ngrams. What am I missing? *Should* this work? > How do I debug this to see if the documents are having these settings > applied to them? > > { > "settings":{ > "index":{ > "analysis":{ > "analyzer":{ > "typeahead_analyzer":{ > "type":"custom", > "tokenizer":"edgeNGram", > "filter":["typeahead_ngram"] > } > }, > "filter":{ > "typeahead_ngram":{ > "type":"edgeNGram", > "min_gram":1, > "max_gram":8, > "side":"front" > } > } > } > } > }, > "mappings": { > "name": { > "properties": { > "name": { > "type": "string", > "analyzer": "typeahead_analyzer" > } > } > } > } > } > > -- > C. Benson Manica > cbman...@gmail.com -- C. Benson Manica cbman...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org