gpt4 book ai didi

php - 如何在查询时删除solr中的动态字段后缀,如_i,_ txt?

转载 作者:行者123 更新时间:2023-12-02 23:02:25 25 4
gpt4 key购买 nike

我正在使用动态字段(Schemaless Feature)在Solr中建立数据索引。
就像我有一些字段,例如 product_txt,id_i,category_txt 等。

我希望上述字段在从solr中选择时作为响应的产品,id,类别。就像想从solr返回时从字段中删除后缀_txt,_i一样。

SOLR本身有可能吗?如果是,请帮助。

最佳答案

您可以使用field aliasing,但是它需要您在fl参数中列出每个字段的别名:

product_txt:product,id_i:id,category_txt:category

关于php - 如何在查询时删除solr中的动态字段后缀,如_i,_ txt?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31645882/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com