booleanquery

Lucene OR search using Boolean query

我的未来我决定 提交于 2019-11-29 13:28:15
问题 I have an index with multiple fields, one of which is a string field in which I store category names for a product... such as "Electronics", "Home", "Garden", etc new StringField("category_name", categoryName, Field.Store.YES)); //categoryName is a value such as "Electronics" I am performing a Boolean query to find products by name, price, and category but I'm not sure how to do an OR search so that I can query for two categories at the same time. My current query looks like this: String cat