Generate snippet from single metadata field only

I have a collection where I’m indexing a whole heap of people data from an xml file. Results are basically a staff directory. Each XMl element is mapped to a meta class in Funnelback, no issues there.

A new requirement has come through to index a new field, a free-text essay-style field. This whole field will also be indexed. In search results we want to provide text from this new field if there’s a match, so it can be highlighted and users know that it matched on that field.

Problem is it’s usually too long to show on a results page, so what I want to do is generate a snippet/summary but based solely on the one metadata field. Other fields will come back and be shown in full, e.g. phone number, etc. It’s just this one long field we need to just show matches and a little bit of the surrounding context.

There’s a few query processing options that will assist here:

  • Summary mode - suggest ‘both’ (metadata and query-biased)
  • Metadata buffer length - suggest extending to 512 characters or more
  • Summary buffer length - suggest extending to 2048 characters+
  • Excerpt order - suggest experimenting with either {{0}} (natural order) or {{1}} sorted by score

Refer:

Additionally, XML mappings can be updated to indicate which fields are considered for query-biased summaries: