Join Signals with Item Metadata
Fusion’s basic aggregation jobs aggregate using the document ID. You can also aggregate at a more coarse-grained level using other fields available for documents (item metadata), such as manufacturer or brand for products. Aggregating with item metadata is useful for building personalization boosts into your search application.
The following PUT request creates additional aggregation jobs that join signals with the primary products
collection to compute an aggregated weight for a manufacturer
field:
curl -X PUT -H "Content-type:application/json" -d '{"enabled":true, "metadata_column":"manufacturer"}' "http://localhost:{api-port}/api/collections/products/features/signals"
After performing the PUT request shown above, you will have two additional aggregation jobs in Fusion.
COLLECTION_NAME_user_METADATA_preferences_aggregation
This job computes an aggregated weight for each user/item metadata combination, e.g. user/manufacturer, found in the signals collection. Fusion computes the weight for each group using an exponential time-decay on signal count (30 day half-life) and a weighted sum based on the signal type. Use the signalTypeWeights
parameter to set the correct signal types and weights for your dataset. Use the primaryCollectionMetadataField
parameter to set the name of a field from the primary collection to join into the results, e.g. manufacturer
. You can use the results of this job to boost queries based on user preferences regarding item-specific metadata such as manufacturer (e.g. Ford vs. BMW) or brand (e.g. Ralph Lauren vs. Abercrombie & Fitch).
COLLECTION_NAME_query_METADATA_preferences_aggregation
This job computes an aggregated weight for each query/item metadata combination, e.g. query/manufacturer, found in the signals collection. Fusion computes the weight for each group using an exponential time-decay on signal count (30 day half-life) and a weighted sum based on the signal type. Use the signalTypeWeights
parameter to set the correct signal types and weights for your dataset. Use the primaryCollectionMetadataField
parameter to set the name of a field from the primary collection to join into the results.
These additional item item/metadata aggregation jobs also serve as examples of how to join between the signals and primary collections to perform aggregations on fields other than the document ID. You can re-execute the same PUT request shown above using a different metadata field name in the metadata_column parameter.
|