Stemming Problem

Hi All,

I am having a problem getting stemming working with my index with the
snowball analyzer.

If I use the analyzer directly, I get a stemmed version:
curl -XGET 'localhost:9200/_analyze?analyzer=snowball&pretty=1' -d
'intermingling'
{
"tokens" : [ {
"token" : "intermingl",
"start_offset" : 0,
"end_offset" : 13,
"type" : "",
"position" : 1
} ]

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d 'intermingling'
{
"tokens" : [ {
"token" : "intermingling",
"start_offset" : 0,
"end_offset" : 13,
"type" : "",
"position" : 1
} ]

Here are the settings for the index:

curl -XGET 'http://localhost:9200/test/_settings?pretty=1''
{
"test" : {
"settings" : {
"index.analysis.analyzer.testsnowball_analyzer.type" : "snowball",
"index.analysis.analyzer.testsnowball_analyzer.language" : "English",
"index.number_of_shards" : "5",
"index.number_of_replicas" : "1",
"index.version.created" : "190899",
"index.refresh_interval" : "-1"
}
}

What am I doing wrong?

Thanks,
Chris

--

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d 'intermingling'

You're not specifying which analyzer to use.

Try:

curl -XGET 'localhost:9200/test/_analyze?pretty=1&analyzer=testsnowball' -d 'intermingling'

Similarly, your analyzer won't be applied to any fields unless you
specify that in the mapping for those fields.

clint

--

Thanks! I am specifying the analyzer for the index. What does that do?
Doesn't that apply it to all the fields in the index?
Thanks,
Chris

On Thursday, August 23, 2012 11:24:13 PM UTC-7, Clinton Gormley wrote:

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d 'intermingling'

You're not specifying which analyzer to use.

Try:

curl -XGET 'localhost:9200/test/_analyze?pretty=1&analyzer=testsnowball'
-d 'intermingling'

Similarly, your analyzer won't be applied to any fields unless you
specify that in the mapping for those fields.

clint

--

Hi Chris,

Technically you are only specifying an analyzer that could be used in
that index. In order for it to be used, a field could be mapped to it
(as Clinton described), or it can be specified as the default
analyzer:

I have never overridden the default analyzer, so I am curious about
how it works with the analyze API.

Cheers,

Ivan

On Fri, Aug 24, 2012 at 10:12 AM, ezyrider42 ezyrider42@gmail.com wrote:

Thanks! I am specifying the analyzer for the index. What does that do?
Doesn't that apply it to all the fields in the index?
Thanks,
Chris

On Thursday, August 23, 2012 11:24:13 PM UTC-7, Clinton Gormley wrote:

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d 'intermingling'

You're not specifying which analyzer to use.

Try:

curl -XGET 'localhost:9200/test/_analyze?pretty=1&analyzer=testsnowball'
-d 'intermingling'

Similarly, your analyzer won't be applied to any fields unless you
specify that in the mapping for those fields.

clint

--

--

Thanks, do you have an example of how the default analyzer is specified?

Cheers,
Chris

On Friday, August 24, 2012 10:56:37 AM UTC-7, Ivan Brusic wrote:

Hi Chris,

Technically you are only specifying an analyzer that could be used in
that index. In order for it to be used, a field could be mapped to it
(as Clinton described), or it can be specified as the default
analyzer:

Elasticsearch Platform — Find real-time answers at scale | Elastic

I have never overridden the default analyzer, so I am curious about
how it works with the analyze API.

Cheers,

Ivan

On Fri, Aug 24, 2012 at 10:12 AM, ezyrider42 <ezyri...@gmail.com<javascript:>>
wrote:

Thanks! I am specifying the analyzer for the index. What does that do?
Doesn't that apply it to all the fields in the index?
Thanks,
Chris

On Thursday, August 23, 2012 11:24:13 PM UTC-7, Clinton Gormley wrote:

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d 'intermingling'

You're not specifying which analyzer to use.

Try:

curl -XGET
'localhost:9200/test/_analyze?pretty=1&analyzer=testsnowball'
-d 'intermingling'

Similarly, your analyzer won't be applied to any fields unless you
specify that in the mapping for those fields.

clint

--

--

Never done it myself, so I had to search for it. This post seems to
have the answer:

https://groups.google.com/d/msg/elasticsearch/SgHVv6cjZ6w/89c9hlzwlpEJ

On Fri, Aug 24, 2012 at 11:06 AM, ezyrider42 ezyrider42@gmail.com wrote:

Thanks, do you have an example of how the default analyzer is specified?

Cheers,
Chris

On Friday, August 24, 2012 10:56:37 AM UTC-7, Ivan Brusic wrote:

Hi Chris,

Technically you are only specifying an analyzer that could be used in
that index. In order for it to be used, a field could be mapped to it
(as Clinton described), or it can be specified as the default
analyzer:

Elasticsearch Platform — Find real-time answers at scale | Elastic

I have never overridden the default analyzer, so I am curious about
how it works with the analyze API.

Cheers,

Ivan

On Fri, Aug 24, 2012 at 10:12 AM, ezyrider42 ezyri...@gmail.com wrote:

Thanks! I am specifying the analyzer for the index. What does that do?
Doesn't that apply it to all the fields in the index?
Thanks,
Chris

On Thursday, August 23, 2012 11:24:13 PM UTC-7, Clinton Gormley wrote:

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d 'intermingling'

You're not specifying which analyzer to use.

Try:

curl -XGET
'localhost:9200/test/_analyze?pretty=1&analyzer=testsnowball'
-d 'intermingling'

Similarly, your analyzer won't be applied to any fields unless you
specify that in the mapping for those fields.

clint

--

--

--

That seems to work, Thanks!

On Friday, August 24, 2012 11:31:40 AM UTC-7, Ivan Brusic wrote:

Never done it myself, so I had to search for it. This post seems to
have the answer:

https://groups.google.com/d/msg/elasticsearch/SgHVv6cjZ6w/89c9hlzwlpEJ

On Fri, Aug 24, 2012 at 11:06 AM, ezyrider42 <ezyri...@gmail.com<javascript:>>
wrote:

Thanks, do you have an example of how the default analyzer is specified?

Cheers,
Chris

On Friday, August 24, 2012 10:56:37 AM UTC-7, Ivan Brusic wrote:

Hi Chris,

Technically you are only specifying an analyzer that could be used in
that index. In order for it to be used, a field could be mapped to it
(as Clinton described), or it can be specified as the default
analyzer:

Elasticsearch Platform — Find real-time answers at scale | Elastic

I have never overridden the default analyzer, so I am curious about
how it works with the analyze API.

Cheers,

Ivan

On Fri, Aug 24, 2012 at 10:12 AM, ezyrider42 ezyri...@gmail.com
wrote:

Thanks! I am specifying the analyzer for the index. What does that
do?
Doesn't that apply it to all the fields in the index?
Thanks,
Chris

On Thursday, August 23, 2012 11:24:13 PM UTC-7, Clinton Gormley
wrote:

If I use the index I get, there is no stemming:
curl -XGET 'localhost:9200/test/_analyze?pretty=1' -d
'intermingling'

You're not specifying which analyzer to use.

Try:

curl -XGET
'localhost:9200/test/_analyze?pretty=1&analyzer=testsnowball'
-d 'intermingling'

Similarly, your analyzer won't be applied to any fields unless you
specify that in the mapping for those fields.

clint

--

--

--