curl - Only one tokenizer filter is added when creating/replacing a new field type -


i'm adding field type using curl:

curl -x post -h 'content-type:application/json' --data-binary '{     "add-field-type" :  {         "name":"valuewithsubfields",         "class":"solr.textfield",         "positionincrementgap":"100",         "indexanalyzer":{             "tokenizer": { "class":"solr.keywordtokenizerfactory" },             "filters": [{ "class":"solr.lowercasefilterfactory"}],             "filters": [{ "class":"solr.asciifoldingfilterfactory" }],               "filters": [{ "class":"solr.reversedwildcardfilterfactory" }]                    },         "queryanalyzer": {             "tokenizer": { "class":"solr.keywordtokenizerfactory" },             "filters": [{ "class":"solr.lowercasefilterfactory" }],             "filters": [{ "class":"solr.asciifoldingfilterfactory" }]         }     } }' http://localhost:8983/solr/mymaincore/schema 

here's created field type

<fieldtype name="valuewithsubfields" class="solr.textfield"  positionincrementgap="100">     <analyzer type="index">         <tokenizer class="solr.keywordtokenizerfactory"/>         <filter class="solr.reversedwildcardfilterfactory"/>     </analyzer>     <analyzer type="query">         <tokenizer class="solr.keywordtokenizerfactory"/>         <filter class="solr.asciifoldingfilterfactory"/>     </analyzer> </fieldtype> 

the problem last tokenizer filters added. don't why happening. tried change tokenizer class still same result.

any appreciated.

the array of filters should way

"filters": [               {                  "class":"solr.lowercasefilterfactory"               },               {                  "class":"solr.asciifoldingfilterfactory"               },               {                  "class":"solr.reversedwildcardfilterfactory"               }           ], 

and full curl command

curl -x post -h 'content-type:application/json' --data-binary '{     "add-field-type" :  {         "name":"valuewithsubfields",         "class":"solr.textfield",         "positionincrementgap":"100",         "indexanalyzer":{             "tokenizer": { "class":"solr.keywordtokenizerfactory" },             "filters": [                     {                         "class":"solr.lowercasefilterfactory"                     },                     {                         "class":"solr.asciifoldingfilterfactory"                     },                     {                         "class":"solr.reversedwildcardfilterfactory"                     }                 ]                    },         "queryanalyzer": {             "tokenizer": { "class":"solr.keywordtokenizerfactory" },             "filters": [                     {                         "class":"solr.lowercasefilterfactory"                     },                     {                         "class":"solr.asciifoldingfilterfactory"                     }                 ]         }     } }' http://localhost:8983/solr/mymaincore/schema 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -