ACF pack – How are managed repeaters data and flexible content layouts ?

222 views October 30, 2016 December 14, 2016 admin 1

Definition

In the plugin “Advanced Custom Fields”, repeaters and  flexible contents are recursive fields. They are containers for other simple fields (text, select, …), or other recursive fields.

Example

For instance, a flexible content can contain a files repeater. The files will then be at the third level of the ACF fields hierarchy. And, in that example, the files are the only indexable content. Neither of the 2 containers are relevant for searching.

 

A simple repeater containing 2 repeated fieds (one text, one select)

A simple repeater containing 2 repeated fields (one text, one select)

 

A simple flexible content containing a title, header, and a files repeater

A simple flexible content containing a title, header, and a files repeater

 

Can I select the fields to be indexed ?

All ACF fields can be indexed, as soon as they are not containers. WPSOLR digs in the containers structures, extracts the field definitions that can be indexed and display them for selection in the screen “Indexed data”. Container fields are not shown.

WPSOLR also replaces the sub-fields instances with the field name. For instance, “color” is displayed instead of its sub-fields “_acf_0_color”,_”acf_1_color”,_”acf_2_color”.

The field name is displayed, instead of the repeated names (_acf_0_header, _acf_1_header)

The field name is displayed, instead of the repeated names (_acf_0_header, _acf_1_header)

Are all good WPSOLR features available with containers ?

Incredibly, yes indeed. Act with sub-level fields as with “normal” fields. Index, search, set a Solr type (number, string sortable, multi-valued string …), facet, even boost.

This subfield (multi-select in a flexible content) can be used as a facet.

This subfield (multi-select in a flexible content) can be used as a facet.

 

This subfield (multi-select in a flexible content) can be used as a facet (front-end).

This subfield (multi-select in a flexible content) can be used as a facet (front-end).

 

Does it work with ACF files ?

Yes, it does. ACF files, or repeated ACF files at any level, will be extracted and indexed in the post body.

Why can’t I select the ACF files for indexing?

The ACF file fields are automatically indexed with the post body, if your post WPSOLR metabox options says so.

Select eh wpsolr metabox ACF option to index all ACF file type, at any level in the container hierarchy.

Select the wpsolr metabox ACF option to index all ACF file type, at any level in the container hierarchy.

Are they performance issues with all those recursive structures ?

Indexing will be a bit slower, as parsing through all levels takes time. But the search is not impacted at all, and continues to work as though no containers existed in your posts.

Tags:

Was this helpful?

Leave A Comment
*
*