如何使用" AND"," OR" solr搜索查询中的运算符?

时间:2015-10-17 05:52:33

标签: solr

我很困惑,如何在SOLR搜索查询中使用AND-OR运算符。

http://127.0.0.1:8984/solr/collection1/select?q=category_name:kitchen&category_name:bathroom&reno_wall_colours:red&wt=json&start=0&rows=100&facet=on&facet.field=category_name&hl.fl=category_name

在上面的网址中,我想进行如下查询:

HTML code: <div> Food <!-- Main Category --> <ul> <li style="display:none"> Pizza </li> <!-- Category Child Item --> <li style="display:none"> Falafel </li> <!-- Category Child Item --> <li style="display:none"> Donuts </li> <!-- Category Child Item --> <li style="display:none"> Burger </li> <!-- Category Child Item --> <li style="display:none"> Cheese Sandwich </li> <!-- Category Child Item --> </ul> </div> Require - HTML code output by javascript: <div style="display:none"> Food <!-- Main Category --> <ul> <li style="display:none"> Pizza </li> <!-- Category Child Item --> <li style="display:none"> Falafel </li> <!-- Category Child Item --> <li style="display:none"> Donuts </li> <!-- Category Child Item --> <li style="display:none"> Burger </li> <!-- Category Child Item --> <li style="display:none"> Cheese Sandwich </li> <!-- Category Child Item --> </ul> </div>(category_name:kithcen AND reno_wall_colours:red)