I rephrased my problem in a full curl script. Thus, it may be easier to reproduce the problem (the search is not performed using a custom analyzer). I am using the latest ES for this
Delete old data
curl -XDELETE "http://localhost:9200/test_shingling"
Create an index with settings
curl -XPOST "http://localhost:9200/test_shingling/" -d '{ "settings": { "index": { "number_of_shards": 10, "number_of_replicas": 1 }, "analysis": { "analyzer": { "ShingleAnalyzer": { "tokenizer": "BreadcrumbPatternAnalyzer", "filter": [ "standard", "lowercase", "filter_stemmer", "filter_shingle" ] } }, "filter": { "filter_shingle": { "type": "shingle", "max_shingle_size": 2, "min_shingle_size": 2, "output_unigrams": false }, "filter_stemmer": { "type": "porter_stem", "language": "English" } }, "tokenizer": { "BreadcrumbPatternAnalyzer": { "type": "pattern", "pattern": " |\\$\\$\\$" } } } } }'
Define Display
curl -XPOST "http://localhost:9200/test_shingling/item/_mapping" -d '{ "item": { "properties": { "Title": { "type": "string", "search_analyzer": "ShingleAnalyzer", "index_analyzer": "ShingleAnalyzer" } } } }'
Create document
curl -XPOST "http://localhost:9200/test_shingling/item/" -d '{ "Title":"Kyocera Solar Panel Test" }'
PASS Test Analyzer
curl 'localhost:9200/test_shingling/_analyze?pretty=1&analyzer=ShingleAnalyzer' -d 'Kyocera Solar Panel Test'
Wait for the ES to sync (as well as update indices)
curl -XPOST "http://localhost:9200/test_shingling/_refresh"
Search "Kyocera Solar Panel Test" FAIL
curl -XPOST "http://localhost:9200/test_shingling/item/_search?pretty=true" -d '{ "query": { "term": { "Title": "Kyocera Solar Panel Test" } } }'
Search "Solar Panel" FAIL
curl -XPOST "http://localhost:9200/test_shingling/item/_search?pretty=true" -d '{ "query": { "term": { "Title": "Kyocera Solar Panel Test" } } }'
Search "Kyocera Solar Panel Test" FAIL
curl -XPOST "http://localhost:9200/test_shingling/item/_search?pretty=true" -d '{ "query": { "query_string": { "default_field": "Title", "query": "Kyocera Solar Panel Test" } } }'
Search "Solar Panel" FAIL
curl -XPOST "http://localhost:9200/test_shingling/item/_search?pretty=true" -d '{ "query": { "query_string": { "default_field": "Title", "query": "solar panel" } } }'