Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
検索に問題があります。
サイズの範囲で検索したいのですが、うまくいきません。
サイズ: [0 ~ 1000] で、サイズが 0 ~ 1000 のファイルを表示します。
Lucene でこのタイプの検索を行うことは可能ですか?
ありがとうございました!
数値の範囲でフィールドを検索する場合、最初に確認する必要があるのは、ドキュメントにインデックスを付けてサイズ フィールドを追加するときに、フィールドが数値型であることです。検索中に (構文に問題がある場合)、 を作成しRangeQuery、複数の範囲を で組み合わせることができますBooleanQuery。
RangeQuery
BooleanQuery