Gravatar for

Question by jschjolberg, May 12, 2014 5:34 PM

What is the format of the filterField attribute of the SearchInterface Component?

It looks like the documentation for the filterField option on the SearchInterface Component is mistakenly showing the excerptLength info. Can you let me know what the proper format is for entering the filterField option on the SearchInterface Component? Thanks!

2 Replies
Gravatar for

Answer by Martin Laporte, May 13, 2014 3:57 AM

The documentation was indeed wrong. I fixed that.

filterField is typically used to work with threaded conversations (but it can be used otherwise). You should set it to the name of a field whose value is shared by multiple results. The index will then arrange for each "top level" result returned to have a different value in this field, and stash the other, "filtered out" results in a childResults field on each JSON result.

A common example would be using some kind of @threadid field, when indexing forum posts.

Gravatar for

Answer by Luc Bergeron, May 12, 2014 7:56 PM

The filterField option is expecting an index field name. You can set it to "@systitle" for instance.

Hope this helps

Gravatar for

Comment by jschjolberg, May 12, 2014 8:59 PM

Is this the proper format?


Gravatar for

Comment by Luc Bergeron, May 13, 2014 8:33 AM

Yes that is the correct format. As @mlaporte said, this option is mostly used with conversations, so @systitle was not the best example.

Ask a question