亚马逊Cloudsearch:如果过滤器存在亚马逊、过滤器、存在、Cloudsearch

由网友(一季樱花丶落雨殇)分享简介:我有一个亚马逊cloudsearch域。这样做的目的是滤除如果字段语言的存在。并不是所有的对象都具有一种语言,我希望有那些它确实有语言的过滤,而且还可以返回没有任何语言的人。I have an amazon cloudsearch domain. The aim is to filter if the field...

我有一个亚马逊cloudsearch域。这样做的目的是滤除如果字段语言的存在。 并不是所有的对象都具有一种语言,我希望有那些它确实有语言的过滤,而且还可以返回没有任何语言的人。

I have an amazon cloudsearch domain. The aim is to filter if the field 'language' exists. Not all objects have a language, and I want to have the ones which do have a language filtered, but the ones that do not have any language to also be returned.

我想和筛选 (或语言:'恩'的语言:空)

I want to filter with ( or language:'en' language:null )

不过空不能在字符串中过去了。

However null cannot be passed within a string.

这可能吗?如果是的话会是怎样来完成。

Is this possible? If so how would it be done.

推荐答案

我看着别处藏汉,看来:

I looked elsewhere aswell, it seems :

要做到这一点最简单的方法,就是用来设置字段的默认值,然后使用该值你空。

The simplest way to do that, is to set a default value for the field, and then use that value for your null.

例如,设置默认为字符串空,那么你就可以很容易地为测试。

For example, set the default to the string "null", then you can easily test for that.

我相信你可以添加一个默认值,并重新编制索引,并应重新应用默认的。

I believe you can add a default value, and re-index, and that should reapply the default.

阅读全文

相关推荐

最新文章