索引索尔尔(Solr)

发布于 2025-02-08 08:51:58 字数 770 浏览 2 评论 0原文

我想在文档中使用自定义字段存储一个序列化数据,例如:

<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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文