Darshan Hiranandani : How do I update a metadata value and then use it as a facet in my system?

Hi team,

I’m working with a Web collection that parses an XML feed and extracts a year value from a text field. I’m currently using host_post_datafetch.groovy to extract this value, but it isn’t available for faceting in Funnelback.

I’ve read that post_datafetch runs before facet data is generated, and I’m wondering why the facet value isn’t affected by the hook script. Do you have any insights on this issue?

I’m interested in knowing:

Why the metadata manipulated by post_datafetch isn’t available for faceting.
How to ensure that metadata modifications can be used for faceting.
Any workarounds or best practices for manipulating metadata for faceting in Funnelback.

Regards
Darshan Hiranandani

Hi Darshan,

There are two approaches you can use here:

  1. use a post data fetch hook script to update the facet labels (not metadata values) - I recommend using the hook script that is part of the faceted navigation v2 code available on github. You only need the hook script if you want to rename your facet categories. In FB 16 you get the same behaviour via a supported plugin.

  2. The other way you can update your facet labels is to modify the metadata values before indexing - you can use the metadata normalizer filter to do this Built-in filters: Metadata normaliser filter (MetadataNormaliser) - Funnelback Documentation - Version 15.24.0. NOTE: this will modify the metadata values that get indexes so any changes you make to the values will be reflected everywhere you use the metadata in your search.