Introduction
FAS 21.3 is compatible with the previous release. Its major highlight is that it introduces a new attribute type - date.
Changes in the query language
If there are indexed attributes of type datetime*, you can add criteria based on the fh_location. You can use the same operations as for the int and float types - >, <, =. Querying using dates may require the dates to be encoded as is now done with search criteria. Most notably, the colon character : must be replaced with \u003A. You can also use milliseconds since 00:00:00 UTC on 1 January 1970 instead of a date string. You can read more about it at Fredhopper Query Language.
Changes in default system settings (system.xml)
Dates
In FAS 21.3, we introduce the datetime* attribute type. The following are used to configure how the dates are parsed and formatted. Note that the parsing settings are used for the Query API and the Data API, and the parsing settings are simply a default value. When displaying a date attribute in the response, it is formatted based on the configuration in System -> Localization in Merchandising studio, and the values in system.xml are just defaults in case the localisation settings are not used.
The defaults can be changed in /com/fredhopper/time, but it's not advised.
<node name="com"> <map /> <node name="fredhopper"> <map /> <node name="time"> <map> <!-- The format used for parsing dates in input data (item XMLs) and date attributes in fh_location. The default ISO-8601 is a special constant corresponds to https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_DATE_TIME with dates looking like '2011-12-03T10:15:30+01:00[Europe/Paris]`. Note that the offset '+01:00' and the timezone `[Europe/Paris]` are optional, though if the date string has a timezone, it must also have an offset. Other formats must be valid formats for https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html e.g. 'yyyyMMdd-HHmm' --> <entry key="parsing-date-format" value="ISO-8601"/> <!-- The default timezone for parsing dates in input data (item XMLs) and date attributes in fh_location. Examples: 'UTC', 'GMT', 'Australia/Sydney', 'Europe/Berlin', 'America/New_York' It will only be used if the input date doesn't have an offset or timezone included: 2021-06-06T12:30:00 -> will use the default timezone 2021-06-06T12:30:00+01:00 -> will use +01:00 instead of the default timezone --> <entry key="parsing-default-timezone" value="UTC"/> <!-- The following two properties are the defaults for formatting dates for output in responses, following the rules specified for the two properties above. They are only used if there's no universe/locale specific config set in the Merchandising Studio, in System -> Localization --> <entry key="response-default-date-format" value="dd.MM.yyyy HH:mm"/> <!-- <entry key="response-default-timezone" value="UTC"/> --> </map> </node> </node> </node>
Migration
Migrating from FAS 21.2 to 21.3 requires no specific migration steps.
However, a downgrade of catalogue items or rule entities that makes use of the new attribute type will not be as smooth.
All entities that use location/current item triggers, etc. based on the Date type will not be downgraded successfully. Also, all items that have ??datetime attributes will have to be managed through the XMLLoader config, which allows either rejecting them or ignoring the attribute.
* In FAS 21.3.0, the name of the attribute base type is 'date'. This is inconsistent with the ETL and would cause problems for customers that need to use the Scheduled Product Availability feature. It is highly advisory those customers migrate directly to FAS 21.3.1.
Kommentare
0 Kommentare
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.