gpt4 book ai didi

search - Solr 中的通配符查询错误

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

我使用 solr 搜索文档,当尝试使用此查询“id:*”搜索文档时,我收到此查询解析器异常,告诉它无法使用 * 或 ?作为第一个字符。

HTTP Status 400 - org.apache.lucene.queryParser.ParseException: Cannot parse 'id:*': '*' or '?' not allowed as first character in WildcardQuery

type Status report

message org.apache.lucene.queryParser.ParseException: Cannot parse 'id:*': '*' or '?' not allowed as first character in WildcardQuery

description The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse 'id:*': '*' or '?' not allowed as first character in WildcardQuery).

是否有任何补丁可以使其仅与 * 一起使用?还是做这样的查询成本很高?

最佳答案

如果需要所有文档,请查询 *:*

如果您想要具有特定字段(例如 id)的所有文档,请尝试 id:[* TO *]

关于search - Solr 中的通配符查询错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15979/

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