Elasticsearch stemmer issue


(alexshaman) #1

Hello everyone,

I have follow index mapping:

curl -XPUT 'http://localhost:9200/some_content/' -d ' { "settings":{ "query_string":{ "default_con":"content", "default_operator":"AND" }, "index":{ "analysis":{ "analyzer":{ "en_analyser":{ "filter":[ "snowBallFilter" ], "type":"custom", "tokenizer":"standard" } }, "filter":{ "en_stopFilter":{ "type":"stop", "stopwords_path":"lang/stopwords_en.txt" }, "snowBallFilter":{ "type":"snowball", "language":"English" }, "wordDelimiterFilter":{ "catenate_all":false, "catenate_words":true, "catenate_numbers":true, "generate_word_parts":true, "generate_number_parts":true, "preserve_original":true, "type":"word_delimiter", "split_on_case_change":true }, "en_synonymFilter":{ "synonyms_path":"lang/synonyms_en.txt", "ignore_case":true, "type":"synonym", "expand":false }, "lengthFilter":{ "max":250, "type":"length", "min":3 } } } } }, "mappings":{ "docs":{ "_source":{ "enabled":false }, "analyzer":"en_analyser", "properties":{ "content":{ "type":"string", "index":"analyzed", "term_vector":"with_positions_offsets", "omit_norms":"true" } } } } }'

and I posted the next content:

curl -XPOST http://localhost:9200/some_content/docs/ -d '
{
"content" : "Some sampling text formatted for text data"
}'

When I make this one request:
http://epbyvitw0052:9200/some_content/docs/_search?q=sampling

I'm getting result:

{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 0.095891505,
"hits": [
{
"_index": "some_content",
"_type": "docs",
"_id": "saLfx6PYR82YR69je0JbAA",
"_score": 0.095891505
}
]
}
}

but when I send request without type:
http://epbyvitw0052:9200/some_content/_search?q=sampling

then I'm getting nothing:

{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}

although, I can make the next request with term:
http://epbyvitw0052:9200/some_content/_search?q=sampl

the system found it:

{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 0.095891505,
"hits": [
{
"_index": "some_content",
"_type": "docs",
"_id": "saLfx6PYR82YR69je0JbAA",
"_score": 0.095891505
}
]
}
}

It's issue appear when I put some stemmer into analyzer.
Could you explain why the system has such behavior?
May be I do something wrong.

--
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/e311d613-4411-4b70-b800-05f6be9ad5cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2