Standard Metadata
Standard Metadata
The index of your Coveo organization includes a set of default fields which the Coveo indexing pipeline automatically populates with homonymous metadata when it processes an incoming item (for example, the date
field is populated by the date
metadata).
Automatically Included Standard Metadata
Whenever you add or update an item in a Push source, the Push API automatically retrieves and pushes the following standard metadata for you:
-
date
(Date): the date and time when the last push operation that updated the item was made (for example,"2017-11-08T12:18:41.666Z"
).By default, the Push API retrieves the current number of milliseconds since Unix epoch for the
date
metadata.However, you may prefer to retrieve the last modification date from the original document, and pass that value as the date metadata when pushing the corresponding item.
If you’re using a crawling module for the Push source, overriding a date won’t work because the item is updated based on the original date in the crawler state. When a
date
metadata is passed, it’s updated in the index but not in the crawler state. -
filetype
(String): the item file extension (for example,"html"
).You can use the
filetype
default field that gets populated by this metadata to conditionally apply indexing pipeline extensions and/or mapping rules (see Source Item Types). -
indexeddate
(Date): when the item last went through the document processing manager (for example,"2023-11-08T12:18:41.666Z"
). -
size
(Long 64): the item size, in bytes (for example,50683
).Make sure that the item
size
field doesn’t contain any value other than the size of the item itself. For example, if an item for a movie contains asize
metadata that represents the size of the movie in bytes, you should map this metadata to a distinct field (for example,moviesize
). -
source
(String): the name of the source that contains the item (for example,"MyPushSource"
).
Important Generic Standard Metadata to Include
Usually, you should retrieve and include the following standard metadata when you add or update an item in a Push source:
-
documenttype
(String): the type of item (for example,"WebPage"
).You can use the
documenttype
standard field that gets populated by this metadata to conditionally apply indexing pipeline extensions and/or mapping rules.The
documenttype
field and has priority over thefiletype
field in conditional evaluation.See Source Item Types.
-
filename
(String): the name of the original file (for example,"Mypage.html"
). -
permanentid
(String): a value which uniquely and permanently identifies the item (for example,"my10293810329permanent1239810239818id"
). -
sourcetype
(String): the type of source that contains the item (for example,"Push"
).
Other Relevant Standard Metadata to Consider Including
When applicable, you may want to retrieve and include some of the following standard metadata when you add or update an item in a Push source:
-
author
(String): the author of the item (for example,"Alice Smith"
). -
duration
(Double): if the item is a video, its duration in seconds (for example,125.6
) -
height
(Long 32): if the item is an image, its height in pixels (for example,768
) -
language
(Array<String>): the languages the item is available in (for example,["English", "French"]
). -
pages
(Long 32): the total page count of the item (for example,42
). -
title
(String): the title item (for example,"My Document"
). -
width
(Long 32): if the item is an image, its width in pixels (for example,1024
).