索引索尔尔(Solr)
我想在文档中使用自定义字段存储一个序列化数据,例如:
<fieldType name="custom_dates" class="solr.TrieDateField" positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<charFilter class="solr.PatternReplaceCharFilterFactory"
pattern="^.*?\|(.*)$" replacement="$1"/>
</analyzer>
</fieldType>
应该为生日| 2000-01-01T00:00:00:00 Z
索引一个只有REGEXP替换零件2000-01-- 01T00:00:00z
,而存储的完整输入值生日| 2000-01-01T00:00:00:00z
。
但是,在类datefield
的类别下不支持Tokenizer,而仅支持textfield
。如果我将类更改为textfield
它无法在搜索查询中执行日期操作。
是否有可能在非TextField中用RegexP替换索引值?
I want to stored a serialized data in documents with a custom field like:
<fieldType name="custom_dates" class="solr.TrieDateField" positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<charFilter class="solr.PatternReplaceCharFilterFactory"
pattern="^.*?\|(.*)quot; replacement="$1"/>
</analyzer>
</fieldType>
should index a input like birthday|2000-01-01T00:00:00Z
with only regexp replacement part 2000-01-01T00:00:00Z
, while stored full input value birthday|2000-01-01T00:00:00Z
.
but the tokenizer is not supported under class DateField
but only TextField
. if I change class to TextField
it can't do date operation in search query.
is there any possible to replacing index value with regexp in a non-textfield?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论