在Solr中搜索Null和特定值

时间:2013-03-28 11:58:52

标签: solr

我有一个国家/地区列

<field name="COUNTRY" type="string" indexed="true" stored="true">

我需要将国家/地区的值视为美国或空白值,但我无法进行此操作。

我试过了

fq=country[ U]

fq=country['' U]

fq=country[NULL U]

但没有任何效果。

1 个答案:

答案 0 :(得分:0)

基于对这些先前问题的回答

您应该能够使用以下其中一项:

 -(-(country:usa)+(country:{* TO *})) 

 (-country:[* TO *] AND *:*) OR country:usa