Help mapping in elasticsearch for searching content

Hi all,

I setup an elasticsearch to search for my website and need to mapping some
settings to index, this my settings config:

"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [ "my_stop_word", "my_lowercase", "my_ascii_folding" ]
}
},
"filter" : {
"my_stop_word": {
"type": "stop",
"stopwords": "english"
},
"my_lowercase": {
"type": "lowercase"
},
"my_ascii_folding": {
"type": "asciifolding"
}
}
}
}

This is mapping of index:

"properties" : {
"actors" : {
"type" : "string",
"fields" : {
"actors" : {
"type" : "string",
"omit_norms" : "true",
"index_options" : "docs"
},
"my_analyzer_ngram" : {
"type" : "string",
"analyzer" : "my_analyzer",
"include_in_all" : "false"
}
}
},
....

It search ok, but do not action something like google when I type something
wrong, google will remind "Did you mean that?". Example:

If I type "King of thrones" to search with my db, of course db doesn't has
any film named it like this, I expect that search engine will give a clue
"Game of thrones" for user. That's mean if user search do not exactly, my
website still can give a true result for them.

Thanks in advanced

--
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/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Jin

I don't see here how you're searching, but there's nothing in the default
searches that provides this functionality. You want to look into
Elasticsearch's suggestiers feature

-Doug

On Mon, Apr 13, 2015 at 9:49 PM, Jin Nguyen jindov@gmail.com wrote:

Hi all,

I setup an elasticsearch to search for my website and need to mapping some
settings to index, this my settings config:

"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [ "my_stop_word", "my_lowercase", "my_ascii_folding" ]
}
},
"filter" : {
"my_stop_word": {
"type": "stop",
"stopwords": "english"
},
"my_lowercase": {
"type": "lowercase"
},
"my_ascii_folding": {
"type": "asciifolding"
}
}
}
}

This is mapping of index:

"properties" : {
"actors" : {
"type" : "string",
"fields" : {
"actors" : {
"type" : "string",
"omit_norms" : "true",
"index_options" : "docs"
},
"my_analyzer_ngram" : {
"type" : "string",
"analyzer" : "my_analyzer",
"include_in_all" : "false"
}
}
},
....

It search ok, but do not action something like google when I type
something wrong, google will remind "Did you mean that?". Example:

If I type "King of thrones" to search with my db, of course db doesn't has
any film named it like this, I expect that search engine will give a clue
"Game of thrones" for user. That's mean if user search do not exactly, my
website still can give a true result for them.

Thanks in advanced

--
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/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
*Doug Turnbull **| *Search Relevance Consultant | OpenSource Connections,
LLC | 240.476.9983 | http://www.opensourceconnections.com
Author: Taming Search http://manning.com/turnbull from Manning
Publications
This e-mail and all contents, including attachments, is considered to be
Company Confidential unless explicitly stated otherwise, regardless
of whether attachments are marked as such.

--
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/CALG6HL8vZjMtkGAt%2BD8WROMdF-uv5a7Q7kx_sB9bx22zDRrJcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Doug,

These above settings just apart of my searching. It's make my index
searchable. And I want to optimize this system as I said. Thanks for your
reply

On Tuesday, April 14, 2015 at 9:17:08 AM UTC+7, Doug Turnbull wrote:

Hello Jin

I don't see here how you're searching, but there's nothing in the default
searches that provides this functionality. You want to look into
Elasticsearch's suggestiers feature

Suggesters | Elasticsearch Guide [1.5] | Elastic

-Doug

On Mon, Apr 13, 2015 at 9:49 PM, Jin Nguyen <jin...@gmail.com
<javascript:>> wrote:

Hi all,

I setup an elasticsearch to search for my website and need to mapping
some settings to index, this my settings config:

"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [ "my_stop_word", "my_lowercase", "my_ascii_folding" ]
}
},
"filter" : {
"my_stop_word": {
"type": "stop",
"stopwords": "english"
},
"my_lowercase": {
"type": "lowercase"
},
"my_ascii_folding": {
"type": "asciifolding"
}
}
}
}

This is mapping of index:

"properties" : {
"actors" : {
"type" : "string",
"fields" : {
"actors" : {
"type" : "string",
"omit_norms" : "true",
"index_options" : "docs"
},
"my_analyzer_ngram" : {
"type" : "string",
"analyzer" : "my_analyzer",
"include_in_all" : "false"
}
}
},
....

It search ok, but do not action something like google when I type
something wrong, google will remind "Did you mean that?". Example:

If I type "King of thrones" to search with my db, of course db doesn't
has any film named it like this, I expect that search engine will give a
clue "Game of thrones" for user. That's mean if user search do not exactly,
my website still can give a true result for them.

Thanks in advanced

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
*Doug Turnbull **| *Search Relevance Consultant | OpenSource Connections,
LLC | 240.476.9983 | http://www.opensourceconnections.com
Author: Taming Search http://manning.com/turnbull from Manning
Publications
This e-mail and all contents, including attachments, is considered to be
Company Confidential unless explicitly stated otherwise, regardless
of whether attachments are marked as such.

--
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/70438847-9be4-492e-8a88-24c0a0a90cc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.