torchbox/wagtail — pull request #773 by kaedroho (2014-10-30 16:51:17+00:00)
Title: Don't use edgengram as query analyser

When a field uses the partial matching, the edgengram_analyser is added
to that field.

This breaks down the field data into "ngrams" like so:
Hello -> "H", "He", "Hel", "Hell", "Hello"

This allows a users query for "Hel" to match the above text.

The issue that this commit solves is that this was accidentally set as
both the index analyser (as described above) and also the query
analyser.

Setting this as the query analyser will instruct Elasticsearch to
perform the above transformation on the users input to the box as well.
So if, for example, there was a document with the word "Horse" in it, a
users query for "Hello" will match this simply because they both start
with the letter "H".

The solution is to simply set the "index_analyser" instead of the
"analyser" field (which will sets "query_analyser" as well).