Jump to content

Topic on Extension talk:Elastica

Call to undefined method Elastica\Query::setStoredFields

3
Legaulph (talkcontribs)

Initial indexing went without issue. When I search my wiki I get this error:

[W60b6u7GOm7aJbK@gnZVwAAAAAA] /index.php?title=Special%3ASearch&search=PM&go=Go Error from line 57 of /app/mediawiki/extensions/CirrusSearch/includes/Search/SearchRequestBuilder.php: Call to undefined method Elastica\Query::setStoredFields()

Backtrace:

#0 /app/mediawiki/extensions/CirrusSearch/includes/Searcher.php(453): CirrusSearch\Search\SearchRequestBuilder->build()
#1 /app/mediawiki/extensions/CirrusSearch/includes/Searcher.php(461): CirrusSearch\Searcher->buildSearch()
#2 /app/mediawiki/extensions/CirrusSearch/includes/Searcher.php(199): CirrusSearch\Searcher->searchOne()
#3 /app/mediawiki/extensions/CirrusSearch/includes/Hooks.php(542): CirrusSearch\Searcher->nearMatchTitleSearch(string)
#4 /app/mediawiki/includes/Hooks.php(177): CirrusSearch\Hooks::onSearchGetNearMatch(string, NULL)
#5 /app/mediawiki/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#6 /app/mediawiki/includes/search/SearchNearMatcher.php(123): Hooks::run(string, array)
#7 /app/mediawiki/includes/search/SearchNearMatcher.php(32): SearchNearMatcher->getNearMatchInternal(string)
#8 /app/mediawiki/includes/specials/SpecialSearch.php(253): SearchNearMatcher->getNearMatch(string)
#9 /app/mediawiki/includes/specials/SpecialSearch.php(143): SpecialSearch->goResult(string)
#10 /app/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialSearch->execute(NULL)
#11 /app/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#12 /app/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#13 /app/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#14 /app/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#15 /app/mediawiki/index.php(42): MediaWiki->run()
#16 {main}
MediaWiki	1.31.0
PHP	7.1.8 (apache2handler)
MySQL	5.6.10
ICU	50.1.2
Elasticsearch	5.3.0
Elastica	1.3.0.0 (0959e38) 20:02, 24 October 2016
CirrusSearch	0.2 (c23ae6a) 17:21, 25 October 2016
Loman87 (talkcontribs)

Hi, I am getting the same error with the following configuration

Product Version
MediaWiki 1.31.1
PHP 7.0.25-0ubuntu0.16.04.1 (apache2handler)
MySQL 5.7.21-0ubuntu0.16.04.1
ICU 55.1
Elasticsearch 5.6.1
Lua 5.1.5

any ideas?

Loman87 (talkcontribs)

Hi, I solved uninstalling elastic search, Elastica and CirrusSearch extensions and then following the instructions from the beginning. Everything works now. I guess it could be an issue after upgrading from 1.27.4 to 1.31.1 where another version of elasticsearch is used.

Reply to "Call to undefined method Elastica\Query::setStoredFields"