Search for ranges - Search for ranges - Alfresco - Alfresco Search Enterprise - Alfresco/Alfresco-Search-Enterprise/3.2/Alfresco-Search-Enterprise/Alfresco-Search-Enterprise/Using/Search-for-ranges - 3.2

Alfresco Search Enterprise

Platform
Alfresco
Product
Alfresco Search Enterprise
Release
3.2
ft:lastPublication
2026-05-06T19:34:57.842000
ft:locale
en-US
ArchiveStatus
Archived

Inclusive ranges can be specified in Google-style. There is an extended syntax for more complex ranges. Unbounded ranges can be defined using MIN and MAX for numeric and date types and "u0000" and "FFFF" for text (anything that is invalid).

Lucene/CMIS Google Description Example
[#1 TO #2] #1..#2 The range #1 to #2 inclusive `#1 <= x <= #2` 0..5[0 TO 5]
<#1 TO #2] The range #1 to #2 including #2 but not #1.#1 < x <= #2 <0 TO 5]
[#1 TO #2> The range #1 to #2 including #1 but not #2.#1 <= x < #2 [0 TO 5>
<#1 TO #2> The range #1 to #2 exclusive.#1 < x < #2 <0 TO 5>
TEXT:apple..banana
my:int:[0 TO 10]
my:float:2.5..3.5
my:float:0..MAX
mt:text:[l TO "uFFFF"]

When searching for a date range you can use a partial date. Elasticsearch replaces the missing date components with the values below:

  • Month of year: 01
  • Day of month: 01
  • Hour of day: 23
  • Minute of hours: 59
  • Second of minute: 59
  • Nano of second: 999_999_999

The last four items will be replaced with 0 when the date component is missing in the minimum date in a range expression, e.g. [1950 to 2021] will be executed as [1950-01-01T00:00:00 TO 2021-01-01T23:59:59].

In the REST API you can specify the timezone to be used in search for date ranges.

{
    "query": {
        "query": "cm:created:['2021-05-01T09:00:00' TO '2021-05-28T09:05:59']",
        "language": "afts"
    },
    "localization": {
        "timezone": "Asia/Yerevan"
    }
}