Jump to content

Topic on Help talk:CirrusSearch

Error: Couldn't update existing mappings. You may need to reindex.

3
Paulxu20 (talkcontribs)

Dear team, I am trying to install Elasticsearch on my wiki according to the manual here:https://gerrit.wikimedia.org/g/mediawiki/extensions/CirrusSearch/+/HEAD/README

but something went wrong when I execute this "php $MW_INSTALL_PATH/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php", I got below error, "Couldn't update existing mappings. You may need to reindex.", I am totally new to search engine, can anyone help me to understand what my next step could be? By the way I have Elasticsearch version 6.5.4 installed and it seems working fine (curl localhost:9200 gives me the json). Also just FYI I had 7.x installed before this and then had to uninstall it because I later realized that the manual says "1.35.x require Elasticsearch 6.5.x". Thank you!


indexing namespaces...

        Indexing namespaces...done

content index...

        Fetching Elasticsearch version...6.5.4...ok

        Scanning available plugins...

                experimental-highlighter

        Picking analyzer...default

        Inferring index identifier...servidz8_mp1_content_first

                Validating number of shards...ok

                Validating replica range...ok

                Validating shard allocation settings...done

                Validating max shards per node...ok

        Validating analyzers...ok

        Validating mappings...

                Validating mapping...different...failed!

Couldn't update existing mappings. You may need to reindex.

Here is elasticsearch's error message: illegal_argument_exception: Mapper for [heading] conflicts with existing mapping in other types:

[mapper [heading] has different [store_term_vector] values, mapper [heading] has different [store_term_vector_offsets] values, mapper [heading] has different [store_term_vector_positions] values]

Paulxu20 (talkcontribs)

Hello, anyone can help? Much appreciated!

DCausse (WMF) (talkcontribs)

Hi,

this error arises when CirrusSearch is unable to update the configuration of an index. When this happens the wiki has to be re-indexed and this can be done using the same command with different options:

php $MW_INSTALL_PATH/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php --reindexAndRemoveOk --indexIdentifier now

Reply to "Error: Couldn't update existing mappings. You may need to reindex."