Topic on Help talk:CirrusSearch

Synonym Token Filter and Stop Token Filter

6
Gpontespc (talkcontribs)

How do I configure synonym token filter and stop token filter? Help me please


    curl -X PUT "localhost:9200/kb_mediawiki_general_first/_settings?pretty" -H 'Content-Type: application/json' -d'                                                                                                             

    {                                                                                                                                                                                                             

    ┆   "settings": {                                                                                                                                                                                             

    ┆   ┆   "analysis": {                                                                                                                                                                                         

    ┆   ┆   ┆   "filter": {                                                                                                                                                                                       

    ┆   ┆   ┆   ┆   "my_stop": {                                                                                                                                                                                   

    ┆   ┆   ┆   ┆   ┆   "type": "stop",                                                                                                                                                                           

    ┆   ┆   ┆   ┆   ┆   "stopwords_path": "analysis/stop.txt"                                                                                                                                                     

    ┆   ┆   ┆   ┆   }                                                                                                                                                                                             

    ┆   ┆   ┆   }                                                                                                                                                                                                 

    ┆   ┆   }                                                                                                                                                                                                     

    ┆   }                                                                                                                                                                                                         

    }'


    curl -X PUT "localhost:9200/kb_mediawiki_content_first/_settings?pretty" -H 'Content-Type: application/json' -d'                                                                                             

    {                                                                                                                                                                                                             

    ┆   "settings": {                                                                                                                                                                                             

    ┆   ┆   "analysis": {                                                                                                                                                                                         

    ┆   ┆   ┆   "filter": {                                                                                                                                                                                       

    ┆   ┆   ┆   ┆   "my_stop": {                                                                                                                                                                                   

    ┆   ┆   ┆   ┆   ┆   "type": "stop",                                                                                                                                                                           

    ┆   ┆   ┆   ┆   ┆   "stopwords_path": "analysis/stop.txt"                                                                                                                                                     

    ┆   ┆   ┆   ┆   }                                                                                                                                                                                             

    ┆   ┆   ┆   }                                                                                                                                                                                                 

    ┆   ┆   }                                                                                                                                                                                                     

    ┆   }                                                                                                                                                                                                         

    }'


This way doesn't seem to work :/

Gpontespc (talkcontribs)

I'm using a version MediaWiki 1.30.0, PHP 7.0.27, ElasticSearch 5.4.3, CirrusSearch 0.2 and Elastica 1.3.0.0

DCausse (WMF) (talkcontribs)

Sadly there are no ways to configure this without modifying the source code of CirrusSearch and changing such settings directly inside elasticsearch is not possible on an existing index. Please don't hesitate to file a feature request using Phabricator.

Gpontespc (talkcontribs)

Which file needs to change?

DCausse (WMF) (talkcontribs)
Gpontespc (talkcontribs)

Thank You!!!!

Reply to "Synonym Token Filter and Stop Token Filter"