Create a Custom Date/Time Parser

  • how-to
    +
    Create a custom date/time parser with the Couchbase Capella UI to tell the Search Service how to process a new date/time format.

    If you store date data in a format other than RFC-3339 (ISO-8601), then you need to create a date/time parser.

    Prerequisites

    • You have the Search Service enabled on a node in your database. For more information about how to change Services on your database, see Modify a Database.

    • You have logged in to the Couchbase Capella UI.

    • You have started to create or already created an index in Advanced Mode.

    Procedure

    To create a custom date/time parser with the Capella UI in Advanced Mode:

    1. On the Databases page, select the database that has the Search index you want to edit.

    2. Go to Data Tools  Search.

    3. Click the index where you want to create a custom date/time parser.

    4. Under Advanced Settings, expand Date Time Parsers.

      Make sure you use Advanced Mode.
    5. Click Add Date/Time Parser

    6. In the Name field, enter a name for the date/time parser.

    7. In the New Word field, enter a date/time layout with Go syntax.

      For more information, see the documentation about the Go Programming Language Time Package’s Layout Constant.

    8. Click Add.

    9. (Optional) To add an additional layout, repeat the previous steps.

    10. Click Submit.