简体   繁体   中英

searching in solr for specific values with dismax

I'm using the dismax handler to perform solr search over records (boosting some fields).

In my index, I have a RetailerId for each document, as well as other fields.

My query needs to search for documents that have this RetailerId as well as keywords:

http://localhost:8983/solr/select?qt=dismax&q=RetailerId:(27 OR 92) AND socks

What is the syntax for such a query? Thanks!

Dismax does not support boolean operators. For a query like the one you described, you need to use the Standard Query Handler.

UPDATE

I have made a couple of tests and the fq parameter seems to work with dismax:
/select?qt=dismax&q=socks&fq=RetailerId:(27 OR 92)

如果你想通过facet过滤,那么用户eDismax(扩展的disMax)可以这样说,例如q= your query AND face_name:"facet value"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM