Range queries follow the Lucene default query parser standard, with support for date, integer, long, float, and double types.
范围查询遵循Lucene默认查询解析器标准,支持日期、整数、长、浮点和双精度类型。

To search for integer values between 0 and 10 inclusive for the attribute ‘test:integer’:
要为属性“test:integer”搜索介于0和10之间的整数值,请执行以下操作:

@test\:integer:[0 TO 10]

To search for integer values between 0 and 10 exclusive for the attribute ‘test:integer’:
要为属性“test:integer”搜索介于0和10之间的整数值(不包含0和10),请执行以下操作:

@test\:integer:{0 TO 10}

The constants 0 and 10 are tokenized according to the property type. So you could also use the previous search for long, float, and double types.
常量0和10根据属性类型进行分词。所以您也可以使用前面的查询语句搜索long、float和double类型。

You can use the following for float and double ranges.
您可以使用以下查询语句搜索浮点和双精度范围。

@test\:integer:[0.3 TO 10.5]

Date ranges

Dates are specified in ‘yyyy-MM-ddTHH:mm:ss.SSS’ format only. A subset of ISO8601.
日期类型仅以’yyyy-MM-ddTHH:MM:ss.SSS’格式指定(也可以仅日期部分:yyyy-MM-dd)。是ISO8601的一个子集。

@test\:date:[2003\-12\-16T00:00:00 TO 2003\-12\-17T00:00:00]
@test\:date:[2003\-12\-16T00:00:00 TO MAX]
@cm\:created:[NOW TO MAX]
@cm\:created:[MIN TO NOW]

Date ranges accept truncated dates, but you can only truncate to the format to the day.
日期范围接受截断的日期,但只能截断为日期的格式(yyyy-MM-dd)。

文档更新时间: 2020-02-11 08:52   作者:凌云文档