I've installed the Elasticsearch 1.3.1 in Mediawiki 1.23, Elastica
extension version 1.0.1.2 (e112720
https://git.wikimedia.org/commit/mediawiki%2Fextensions%2FElastica.git/e1127206d16c364a2ad7b6d16f2287e49ce4a7fa)
, Cirrus search 0.2 (aeccd2e)
https://git.wikimedia.org/commit/mediawiki%2Fextensions%2FCirrusSearch.git/aeccd2ec58985ac281ce46951222d5a984b3aeaf
.
Whenever I'm searching from the Mediawiki, I'm facing issues and results
are not returned.
I'm seeing an message like "An error has occurred while searching: We could
not complete your search due to a temporary problem. Please try again
later."
When I enable the debug on Mediawiki, I see
"WarningSearch backend error during full_text search for 'wiki' after 342.
Error message: 6 CirrusSearch\ElasticsearchIntermediary::failure"
I tried to dig in the code and see what exactly the error message 6 and the
reason for failure, I see the below exception
Elastica\Exception\PartialShardFailureException Object ( [_request:protected
] => Elastica\Request Object ( [_connection:protected] => Elastica
Connection Object ( [_params:protected] => Array ( [config] => Array ( ) [
host] => localhost [enabled] => 1 [timeout] => 40 ) [_rawParams:protected]
=> Array ( ) ) [_params:protected] => Array ( [path] => wikidb/page/_search
[method] => GET [data] => Array ( [_source] => Array ( [0] => id [1] =>
title [2] => namespace [3] => redirect.* [4] => timestamp [5] => text_bytes
) [fields] => text.word_count [query] => Array ( [filtered] => Array ( [
query] => Array ( [bool] => Array ( [minimum_number_should_match] => 1 [
should] => Array ( [0] => Array ( [query_string] => Array ( [query] => wiki
[fields] => Array ( [0] => title.plain^20 [1] => heading.plain^5 [2] => text
.plain^1 [3] => file_text.plain^0.8 [4] => redirect.title.plain^15 [5] =>
title^10 [6] => heading^2.5 [7] => text^0.5 [8] => file_text^0.4 [9] =>
redirect.title^7.5 ) [auto_generate_phrase_queries] => 1 [phrase_slop] => 1
[default_operator] => AND [allow_leading_wildcard] => [fuzzy_prefix_length]
=> 2 ) ) [1] => Array ( [query_string] => Array ( [query] => wiki [fields]
=> Array ( [0] => title.near_match^40 [1] => redirect.title.near_match^30 )
[auto_generate_phrase_queries] => 1 [phrase_slop] => 1 [default_operator] =>
AND [allow_leading_wildcard] => [fuzzy_prefix_length] => 2 ) ) ) ) ) [filter
] => Array ( [terms] => Array ( [namespace] => Array ( [0] => 0 [1] => 100 )
) ) ) ) ......
....
[_error:protected] =>
[_transferInfo:protected] => Array
(
[url] => http:
//localhost:9200/wikidb/page/_search?search_type=dfs_query_then_fetch&timeout=20s
[content_type] => application/json; charset=UTF-8
[http_code] => 200
[header_size] => 114
[request_size] => 210
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.182986
[namelookup_time] => 0.000206
[connect_time] => 0.000746
[pretransfer_time] => 0.000748
[size_upload] => 1929
[size_download] => 42551
[speed_download] => 232536
[speed_upload] => 10541
[download_content_length] => 42551
[upload_content_length] => 1929
[starttransfer_time] => 0.001095
[redirect_time] => 0
[certinfo] => Array
(
)
[redirect_url] =>
)
[_response:protected] => Array
(
[took] => 174
[timed_out] =>
[_shards] => Array
(
[total] => 8
[successful] => 2
[failed] => 6
[failures] => Array
(
[0] => Array
(
[index] => wikidb_content_first
[shard] => 3
[status] => 400
[reason] => RemoteTransportException[[Masked Marauder][inet[/SOMEIP:9301]][
search/phase/dfs]]; nested: SearchParseException[[wikidb_content_first][3]:
query[filtered(((title.plain:wiki^20.0 | heading.plain:wiki^5.0 | text.plain
:wiki | file_text.plain:wiki^0.8 | redirect.title.plain:wiki^15.0 | title:
wiki^10.0 | heading:wiki^2.5 | text:wiki^0.5 | file_text:wiki^0.4 | redirect
.title:wiki^7.5) (title.near_match:wiki^40.0 | redirect.title.near_match:
wiki^30.0))~1)->cache(namespace: namespace: d)],from[-1],size[50]: Parse
Failure [Failed to parse source [{"_source":["id","title","namespace",
"redirect.*","timestamp","text_bytes"],"fields":"text.word_count","query":{
"filtered":{"query":{"bool":{"minimum_number_should_match":1,"should":[{
"query_string":{"query":"wiki","fields":["title.plain^20","heading.plain^5",
"text.plain^1","file_text.plain^0.8","redirect.title.plain^15","title^10",
"heading^2.5","text^0.5","file_text^0.4","redirect.title^7.5"],
"auto_generate_phrase_queries":true,"phrase_slop":1,"default_operator":"AND"
,"allow_leading_wildcard":false,"fuzzy_prefix_length":2}},{"query_string":{
"query":"wiki","fields":["title.near_match^40",
"redirect.title.near_match^30"],"auto_generate_phrase_queries":true,
"phrase_slop":1,"default_operator":"AND","allow_leading_wildcard":false,
"fuzzy_prefix_length":2}}]}},"filter":{"terms":{"namespace":[0,100]}}}},
"highlight":{"pre_tags":[""],"post_tags":[""],"fields":{"title":{
"number_of_fragments":0,"type":"fvh","order":"score","matched_fields":[
"title","title.plain"]},"text":{"number_of_fragments":1,"fragment_size":100,
"type":"fvh","order":"score","no_match_size":100,"matched_fields":["text",
"text.plain"]},"file_text":{"number_of_fragments":1,"fragment_size":100,
"type":"fvh","order":"score","matched_fields":["file_text","file_text.plain"
]},"redirect.title":{"number_of_fragments":1,"fragment_size":10000,"type":
"fvh","order":"score","matched_fields":["redirect.title",
"redirect.title.plain"]},"heading":{"number_of_fragments":1,"fragment_size":
10000,"type":"fvh","order":"score","matched_fields":["heading",
"heading.plain"]}}},"size":50,"rescore":[{"window_size":8192,"query":{
"rescore_query":{"function_score":{"functions":[{"script_score":{"script":"log10((doc['incoming_links'].isEmpty()
? 0 : doc['incoming_links'].value) + 2)"}},{"boost_factor":"0.2","filter":{
"terms":{"namespace":[100]}}}]}},"query_weight":1,"rescore_query_weight":1,
"score_mode":"multiply"}}],"stats":["full_text"]}]]]; nested:
QueryParsingException[[wikidb_content_first] script_score the script could
not be loaded]; nested: ScriptException[dynamic scripting for [mvel]
disabled];
)
[1] => Array
(
[index] => wikidb_content_first
[shard] => 1
[status] => 400
[reason] => SearchParseException[[wikidb_content_first][1]: query[filtered
(((title.plain:wiki^20.0 | heading.plain:wiki^5.0 | text.plain:wiki |
file_text.plain:wiki^0.8 | redirect.title.plain:wiki^15.0 | title:wiki^10.0
| heading:wiki^2.5 | text:wiki^0.5 | file_text:wiki^0.4 | redirect.title:
wiki^7.5) (title.near_match:wiki^40.0 | redirect.title.near_match:wiki^30.0
))~1)->cache(namespace: namespace: d)],from[-1],size[50]: Parse Failure [
Failed to parse source [{"_source":["id","title","namespace","redirect.*",
"timestamp","text_bytes"],"fields":"text.word_count","query":{"filtered":{
"query":{"bool":{"minimum_number_should_match":1,"should":[{"query_string":{
"query":"wiki","fields":["title.plain^20","heading.plain^5","text.plain^1",
"file_text.plain^0.8","redirect.title.plain^15","title^10","heading^2.5",
"text^0.5","file_text^0.4","redirect.title^7.5"],
"auto_generate_phrase_queries":true,"phrase_slop":1,"default_operator":"AND"
,"allow_leading_wildcard":false,"fuzzy_prefix_length":2}},{"query_string":{
"query":"wiki","fields":["title.near_match^40",
"redirect.title.near_match^30"],"auto_generate_phrase_queries":true,
"phrase_slop":1,"default_operator":"AND","allow_leading_wildcard":false,
"fuzzy_prefix_length":2}}]}},"filter":{"terms":{"namespace":[0,100]}}}},
"highlight":{"pre_tags":[""],"post_tags":[""],"fields":{"title":{
"number_of_fragments":0,"type":"fvh","order":"score","matched_fields":[
"title","title.plain"]},"text":{"number_of_fragments":1,"fragment_size":100,
"type":"fvh","order":"score","no_match_size":100,"matched_fields":["text",
"text.plain"]},"file_text":{"number_of_fragments":1,"fragment_size":100,
"type":"fvh","order":"score","matched_fields":["file_text","file_text.plain"
]},"redirect.title":{"number_of_fragments":1,"fragment_size":10000,"type":
"fvh","order":"score","matched_fields":["redirect.title",
"redirect.title.plain"]},"heading":{"number_of_fragments":1,"fragment_size":
10000,"type":"fvh","order":"score","matched_fields":["heading",
"heading.plain"]}}},"size":50,"rescore":[{"window_size":8192,"query":{
"rescore_query":{"function_score":{"functions":[{"script_score":{"script":"log10((doc['incoming_links'].isEmpty()
? 0 : doc['incoming_links'].value) + 2)"}},{"boost_factor":"0.2","filter":{
"terms":{"namespace":[100]}}}]}},"query_weight":1,"rescore_query_weight":1,
"score_mode":"multiply"}}],"stats":["full_text"]}]]]; nested:
QueryParsingException[[wikidb_content_first] script_score the script could
not be loaded]; nested: ScriptException[dynamic scripting for [mvel]
disabled];
)
...
....
etc
When I checked the health of the ES,it seems to be good
curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty=true' { "cluster_name" : "elasticsearch", "status" : "green", "timed_out" : false, "number_of_nodes" : 5, "number_of_data_nodes" : 5, "active_primary_shards" : 9, "active_shards" : 9, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 0 }
When I do a search from console, I get results,
curl -XGET 'http://127.0.0.1:9200/wikidb/page/_search?q=wiki'
{"took":157,"timed_out":false,"_shards":{"total":8,"successful":8,"failed":0
},"hits":{"total":9699,"max_score":2.014001,"hits":[{"_index":
"wikidb_general_first","_type":"page","_id":"115792","_score":2.014001,
"_source":{"namespace":6,"namespace_text":"File","title":"I need help
ani.gif","timestamp":"2009-05-20T21:41:07Z","category":[],"external_link"
:[],"heading":[],"outgoing_link":[],"template":[],"text":"how to find help
in wiki","text_bytes":24}},..............
What could be the problem? Did I made any configuration issues? How to debug and fix it?
--
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/9fa1f72f-d195-490b-bb9c-c57eedc79d93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.