When you search, entries are generally a term or a phrase. The string representation you type in will be transformed to the appropriate type for each property when executing the query. For convenience, there are numeric literals but string literals can also be used.
搜索时,条目通常是一个术语或短语。执行查询时,键入的字符串表示形式将转换为每个属性的适当类型。为了方便起见,有数字文本,但也可以使用字符串文本。

Date formatting 日期格式

You can specify either a particular date or a date literal. A date literal is a fixed expression that represents a relative range of time, for example last month, this week, or next year.
可以指定特定日期或日期常量。日期常量是一个固定表达式,表示相对时间范围,例如上个月、本周或明年。

dateTime field values are stored as Coordinated Universal Time (UTC). The date fields represent a point in time with millisecond precision. For date field formatting, Solr uses DateTimeFormatter.ISO_INSTANT. The ISO instant formatter formats an instant in Coordinated Universal Time (UTC), for example:
日期时间字段值存储为协调世界时(UTC)。日期字段以毫秒精度表示时间点。对于日期字段格式,Solr使用DateTimeFormatter.ISO_INSTANT。ISO即时格式化程序以协调世界时(UTC)格式格式化一个即时,例如:

YYYY-MM-DDThh:mm:ssZ
  • YYYY is the year.
  • MM is the month.
  • DD is the day of the month.
  • hh is the hour of the day as on a 24-hour clock.
  • mm is minutes.
  • ss is seconds.
  • Z is a literal Z character indicating that this string representation of the date is in UTC.

No time zone can be specified. The string representation of dates is always expressed in UTC, for example:
不能指定时区。日期的字符串表示形式始终以UTC表示,例如:

1972-05-20T17:33:18Z

String literals 字符串常量

String literals for phrases can be enclosed in double quotes or single quotes. Java single character and \uXXXX-based escaping are supported within these literals.
短语的字符串文字可以用双引号或单引号括起来。这些文本中支持Java单字符和基于\uxxx的转义。

Integer and decimal literals conform to the Java definitions.
整数和十进制文字符合Java定义。

Dates as any other literal can be expressed as a term or phrase. Dates are in the format …… Any or all of the time can be truncated.
日期作为任何其他文字都可以表示为一个术语或短语。日期是按照一定格式的,任何或所有时间都可以被截断。

In range queries, strings, term, and phrases that do not parse to valid type instance for the property are treated as open ended.
在范围查询中,不解析为属性的有效类型实例的字符串、术语和短语被视为开放式。

test:integer[ 0 TO MAX] matches anything positive
test:integer[ 0 TO MAX] 匹配任意正数
文档更新时间: 2020-02-09 23:15   作者:凌云文档