hbase - why copyfield can not use PatternReplaceCharFilterFactory in solr -
my solr cloud version 4.10.3 in coudera cdh5.4.7.i want use copyfield copy hbase rowkey field , use patternreplacecharfilterfactory delete pattern.but doesn't work.when search document,the rowkey_column , rowkey same,not cut anything.for example,rowkey
"hdsa00_01$41872607-9_11654094_1001292270_1443404975000$0",and rowkey_column must
"41872607-9_11654094_1001292270_1443404975000$0".but same rowkey.why?please me!
config in schema.xml here,rowkey string type:
<field name="rowkey_column" type="rowkeycolumn" indexed="true" stored="true" /> <copyfield source="rowkey" dest="rowkey_column"/> <fieldtype name="rowkeycolumn" class="solr.textfield"> <analyzer> <charfilter class="solr.patternreplacecharfilterfactory" pattern="^\s{9}\$|^healtharchives\$" maxblockchars="20000" /> <tokenizer class="solr.keywordtokenizerfactory"/> </analyzer> </fieldtype>
you don't want $
there, since means "end of string", meaning thing matched that's not whitespace, , 9 characters long. want add replacement=""
should removed.
you can use "analysis" page under admin page (at least native solr, guess cloudera has same functionality available) see how text processed each step in analysis chain field.
copyfield shouldn't relevant this, since copyfield directives happen long before field definitions invoked.
Comments
Post a Comment