You may need to search through records indexed within a specific time range. Use one of the following index time fields:
- indextime: first date/time an item was indexed
- updatetime: most recent update
- psfirstindex: first date/time an item was indexed
- pslatestindex: most recent update
For releases including 9.0 and beyond, all fields use a UTC stamp. For previous versions, see the 8.x Time Stamps section below.
As with all date-time searches, the format is yyyy-mm-dd hh:mm:ss—with or without the punctuation or space. The search server always uses the first four digits as the year and then becomes progressively granular in the above order. It cannot skip elements of the date or time.
Search for Single Date or Time Range
As with all date-time searches, if you are searching for a single date or time range, using TO is not required.
The search below provides you with all records indexed on November 18, 2024:
indextime:[2024-11-18]
The search below returns all records indexed on 2024-11-18 between 08:00:00.000 and 08:59:59.999.
indextime:[2024-11-18 08]
Perform Partial Boundary Searches
To perform a search using a partial year, enter up to the first two characters of that year. This is true with all date-time searches.
The following returns anything during the 2020s:
indextime:[202]
Below returns anything from 2000 to 2099:
indextime:[20]
Include in the Parse Table
For the fields to work, they need a parsetable for ps:record. Before adding these fields to the parse table, verify they are not already included. Contact Professional Services if you need help with this.
Any time a new field is added to the parse table, records that are already fed into the SearchServer are not affected; only new records are tagged with the new field. A full refeed is needed to include all records.
The ps-searchserver service must be restarted for any changes to take effect.
<!-- Default entry for the security field and record envelope -->
<ps:record>
. . .
<field name="psfirstindex" type="datetime" format="YYYY-MM-DD hh:mm:ss">
<tag name="ps:indextime" />
</field>
<field name="pslatestindex" type="datetime" format="YYYY-MM-DD hh:mm:ss">
<tag name="ps:latestindex" />
</field>
<field name="indextime" type="datetime" format="YYYY-MM-DD hh:mm:ss">
<tag name="ps:indextime_utc" />
</field>
<field name="updatetime" type="datetime" format="YYYY-MM-DD hh:mm:ss">
<tag name="ps:latestindex_utc" />
8.x Time Stamps
Index date-time fields time stamps break down as below:
- Two are based on UTC date/time.
- Two are based on the server's local date/time.
- Two are based on the first time a URI was indexed.
- Two are based on the most recent update to that URI (which could be the first time it was indexed).
The four field options are as follows:
- indextime: first date/time an item was indexed
- updatetime: most recent update
- psfirstindex: first date/time an item was indexed
- pslatestindex: most recent update