Assuming the response for the settings and mappings for your cluster are
the same as the requests, and you're expecting "name" to match on "arango".
The reason "arango" isn't partially matching as you're expecting because
"arango" doesn't match any documents in _all.
In the tutorial mentioned, queries are being used to highlight results as
you search. As the example mentions in the tutorial, a query match for
"disn 123 2013" will highlight matching results in the search box.
But using the same tutorial searching for "disnp 123 2013" or "disnp" will
give no results. This tutorial works really well when you're looking to
have a search only find exactly what you search for.
If you're looking to allow for spell checking/errors in your auto-complete,
I suggest looking into the suggesthttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.htmlapi. I hope that makes sense, let me know if I can offer my explanation.
On Tuesday, May 6, 2014 10:50:03 AM UTC-5, HungryHorace wrote:
Hi Michael.
I'm on windows so I'm using sense rather than curl. here are my requests
PUT /travelshopoffers/_settings
{
"analysis": {
"filter": {
"nGram_filter": {
"type": "nGram",
"min_gram": 2,
"max_gram": 20,
"token_chars": [
"letter",
"digit",
"punctuation",
"symbol"
]
}
},
"analyzer": {
"nGram_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding",
"nGram_filter"
]
},
"whitespace_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
}
PUT /travelshopoffers/geo/_mapping
{
"mappings": {
"geo": {
"_all": {
"index_analyzer": "nGram_analyzer",
"search_analyzer": "whitespace_analyzer"
},
"properties": {
"name": {
"type": "string",
"include_in_all": true
},
"lat": {
"type": "string",
"index": "no"
},
"lng": {
"type": "string",
"index": "no"
},
"countryCode": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false
},
"countryName": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false
}
}
}
}
}
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f9335fdf-b46c-4467-8c59-7e93c639ddde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.