有没有CloudSearch结构化查询返回没有字段中的值的结果吗?例如,我有一个名为领域 target_date
,这并不总是有一个价值,我想返回所有结果,没有target_date。此字段未被zero'd出或设置为默认;它不带日期的项目存在的。
Is there a CloudSearch structured query to return results that do not have a value within a field? For example, I have a field called target_date
that does not always have a value and I want to return all results with no target_date. This field is not zero'd out or set to a default; it doesn't exist at all for items without the date.
还有另外一种情况了。我需要经过 target_date
返回所有结果文件,包括但现有的日期的任何结果。我使用的结构化查询 target_date:['2000-03-03T00:00:00Z'}
。查询发现不存在的日期应与和
运营商合作,如:(和target_date:['2000-03-03T00:00: 00Z'} [QUERY_GOES_HERE])
There is another case too. I need to return all results after a target_date
AND include any results without an existing date. The structured query I am using is target_date:['2000-03-03T00:00:00Z',}
. The query to find non-existing dates should work with an and
operator, like: (and target_date:['2000-03-03T00:00:00Z',} [QUERY_GOES_HERE])
我相信你问同样的事情,Amazon Cloudsearch:过滤器是否存在
I believe you're asking the same thing as Amazon Cloudsearch : Filter if exists
要在那里总结的选项:
添加一个新的布尔字段名为has_target_date 设置默认target_date(例如1/1/1970)意味着它不存在 的黑客:(范围字段= target_date [0,})所有这些选项应该与你的问题的QUERY_GOES_HERE部分。
Any of those options should work with the QUERY_GOES_HERE portion of your question.