• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

New Install Error

SatGuyScott

Active member
#1
Just installed XFES and completed the reindex. However when anyone searches they get the following error.

The search could not be completed. Please try again later.

The Xenforo Error log shows...

XenForo_Exception: Elasticsearch error: SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[w3jtuTz-SE-mRVa40DbVsg][scott][0]: SearchParseException[[scott][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"Can I add another Satellite dish to my shop and get Dish TV","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446667024,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[scott] script_score the script could not be loaded]; nested: ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled]; }{[w3jtuTz-SE-mRVa40DbVsg][scott][1]: SearchParseException[[scott][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"Can I add another Satellite dish to my shop and get Dish TV","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446667024,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[scott] script_score the script could not be loaded]; nested: ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled]; }{[w3jtuTz-SE-mRVa40DbVsg][scott][2]: SearchParseException[[scott][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"Can I add another Satellite dish to my shop and get Dish TV","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446667024,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[scott] script_score the script could not be loaded]; nested: ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled]; }{[w3jtuTz-SE-mRVa40DbVsg][scott][3]: SearchParseException[[scott][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"Can I add another Satellite dish to my shop and get Dish TV","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446667024,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[scott] script_score the script could not be loaded]; nested: ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled]; }{[w3jtuTz-SE-mRVa40DbVsg][scott][4]: SearchParseException[[scott][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"Can I add another Satellite dish to my shop and get Dish TV","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446667024,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[scott] script_score the script could not be loaded]; nested: ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled]; }] -library/XenES/Search/SourceHandler/ElasticSearch.php:845

HELP! Any ideas?
 

Attachments

SatGuyScott

Active member
#2
[2015-11-04 20:46:44,551][DEBUG][action.search.type ] [Vision] [scott][3], node[kMKEUwPKQ_uHSZr-YmVKVw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@452ae67b] lastShard [true]
org.elasticsearch.search.SearchParseException: [scott][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"moonlight","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446670004,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:747)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:572)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:544)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:306)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.index.query.QueryParsingException: [scott] script_score the script could not be loaded
at org.elasticsearch.index.query.functionscore.script.ScriptScoreFunctionParser.parse(ScriptScoreFunctionParser.java:93)
at org.elasticsearch.index.query.functionscore.FunctionScoreQueryParser.parse(FunctionScoreQueryParser.java:133)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:307)
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:382)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:281)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:731)
... 9 more
Caused by: org.elasticsearch.script.ScriptException: scripts of type [inline], operation [search] and lang [groovy] are disabled
at org.elasticsearch.script.ScriptService.compile(ScriptService.java:285)
at org.elasticsearch.script.ScriptService.search(ScriptService.java:483)
at org.elasticsearch.index.query.functionscore.script.ScriptScoreFunctionParser.parse(ScriptScoreFunctionParser.java:90)
... 16 more
[2015-11-04 20:46:44,551][DEBUG][action.search.type ] [Vision] [scott][2], node[kMKEUwPKQ_uHSZr-YmVKVw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@452ae67b] lastShard [true]
org.elasticsearch.search.SearchParseException: [scott][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"term":{"node":10}}]},"query":{"query_string":{"query":"moonlight","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1446670004,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":300,"fields":["discussion_id","user","date"]}]]
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:747)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:572)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:544)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:306)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.index.query.QueryParsingException: [scott] script_score the script could not be loaded
at org.elasticsearch.index.query.functionscore.script.ScriptScoreFunctionParser.parse(ScriptScoreFunctionParser.java:93)
at org.elasticsearch.index.query.functionscore.FunctionScoreQueryParser.parse(FunctionScoreQueryParser.java:133)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:307)
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:382)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:281)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:731)
... 9 more
Caused by: org.elasticsearch.script.ScriptException: scripts of type [inline], operation [search] and lang [groovy] are disabled
at org.elasticsearch.script.ScriptService.compile(ScriptService.java:285)
at org.elasticsearch.script.ScriptService.search(ScriptService.java:483)
at org.elasticsearch.index.query.functionscore.script.ScriptScoreFunctionParser.parse(ScriptScoreFunctionParser.java:90)
... 16 more
 

Chris D

XenForo developer
Staff member
#3
I think this relates to having dynamic scripting enabled under the Enhanced Search Options.

Dynamic scripting is disabled by default as of ES 1.2 and above. You may need to either disable dynamic scripting in the Enhanced Search Options in the Admin CP, or enable dynamic scripting in Elastic Search itself and copy across the provided scripts to the relevant scripts directory on the server.