elasticsearch/elasticsearch — pull request #3207 by hc (2013-06-19 15:53:09+00:00)
Title: Add Lucene CommonGrams/CommonGramsQuery token fiter

Both filters merged in a single "common_grams" tokenfilter.

Usage:

```json
{
"index":{
"analysis":{
"filter":{
"common_grams_inline":{
"type":"common_grams",
"common_words":[
"brown",
"fox"
]
},
"common_grams_file":{
"type":"common_grams",
"common_words_path":"common_words.txt"
},
"common_grams_caseless":{
"type":"common_grams",
"ignore_case":true,
"common_words_path":"common_words.txt"
},
"common_grams_query_mode":{
"type":"common_grams",
"query_mode":true,
"common_words_path":"common_words.txt"
}
}
}
}
}
```

The "query_mode" enable the CommonGramsQueryFilter: it removes the single words not already part of a shingle.

Closes #3202