クエリシンタックス

トピック作成者:ks-solruserml-bot (2025/07/17 11:14 投稿)
3
(The bot translated the original post https://lists.apache.org/thread/tfc0dylm21yy0260t8j5rf0g9vzgf7cn into Japanese and reposted it under Apache License 2.0. The copyright of posted content is held by the original poster.)
Solr 9.7.0 で次のような動作を確認しています:
値が空(未設定)の属性を検索するために、-attributename1:*
という構文を使っています。
このクエリは正しく動作し、たくさんの結果が返ってきます(多くのドキュメントで attributename1 が空だからです):
http://hostname:8983/solr/solr1/select?q=-attributename1:*%20AND%20Class:Document&wt=xml&rows=10000
ところが、attributename1
または attributename2
のどちらかが空であるものを検索しようとすると、結果が0件になります:
http://hostname:8983/solr/solr1/select?q=-attributename1:*%20OR%20-attributename2:*%20AND%20Class:Document&wt=xml&rows=10000
最初の2つの属性を括弧で囲んでも動作は変わらず、やはり結果はゼロです:
http://hostname:8983/solr/solr1/select?q=(-attributename1:*%20OR%20-attributename2:*)%20AND%20Class:Document&wt=xml&rows=10000
なぜこのようなことが起きているのか、ご存じの方はいらっしゃいますか?
少なくとも attributename1 が空の結果は返ってくるはずだと思うのですが。
Henry Farmerie
トピックへ返信するには、ログインが必要です。