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 (e.g., 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 (e.g.,"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 (e.g.,"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): the date and time when the initial operation that added the item was made (e.g.,"2017-11-08T12:18:41.666Z"
). -
size
(Long 64): the item size, in bytes (e.g.,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 (e.g.,moviesize
). -
source
(String): the name of the source that contains the item (e.g.,"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 (e.g.,"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 (e.g.,"Mypage.html"
). -
permanentid
(String): a value which uniquely and permanently identifies the item (e.g.,"my10293810329permanent1239810239818id"
). -
sourcetype
(String): the type of source that contains the item (e.g.,"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 (e.g.,"Alice Smith"
). -
duration
(Double): if the item is a video, its duration in seconds (e.g.,125.6
) -
height
(Long 32): if the item is an image, its height in pixels (e.g.,768
) -
language
(Array<String>): the languages the item is available in (e.g.,["English", "French"]
). -
pages
(Long 32): the total page count of the item (e.g.,42
). -
title
(String): the title item (e.g.,"My Document"
). -
width
(Long 32): if the item is an image, its width in pixels (e.g.,1024
).