...
- Expand the "Search index" drop-down list under the template property.
Select the facet definition for the property. The options are:
Option Description Disabled The property is not used as a search facet and no Solr document field is created. Unique without facet Creates a Solr document field for the property but no facet. Unique with facet Creates an Advanced Search facet and a Solr document field for the property. Values of this property will always be shown as a unique facet in Advanced search and it will not contain values of other properties from other templates, Combined without facet Creates a Solr document field for the property but no facet. If another property in another template has the same identifier and its search facet is also set to "Combined without facet". the values of these properties will be shown in a single, combined, facet when the above circumstance is met. Combined with facet Creates an Advanced Search facet and a Solr document field for the property. Iif another property in another template has the same identifier and its search facet is also set to "Combined with facet", the values of these properties will be searchable as a single, combined term when the above circumstance is met. - Select "Multiple" if you want to allow multiple values for the facet to be searchable.
- Click [Save].
Solr Document Fields
If a template property is set to unique (with or without facet) or combined (with or without facet), a new Solr document field is added for the property in the content item using the current Modular Template, either a modular content type based on this template or a page with this template assigned as page metadata. The name of the resulting Solr document field depends on the search facet type:
- Unique -
wmamodularcontent0[template identifier]0[property identifier]
- Combined -
wmamodularcontent0[property identifier]
Because combined facets are not template-specific, the template identifier is not part of the field name. Unique facets are template specific, which is why the template identifier is part of the field name.
The Solr document field search facets can hereafter be used in Solr queries. For example, the query
q=(webid:${website.id}^0)&q.alt=*:*&defType=edismax&mm=1&rows=0&facet=true
retrieves all facets. The query
&facet.field=facet_research_institute&fq=facet_research_institute:"waarde"
retrieves the facet "research_institute.
Info |
---|
In JSPs, you have to escapte the quotes and URL encode URL value using the character &. For example: &facet.field=facet_research_institute&fq=facet_research_institute:\"${wmfn:urlEncode(selectedResearchInstitute)}\" |
Modular Content Property Unique Search Facets Examples
...
Combined Facet in Advanced Search
Solr Document Fields
If the search facet is set to unique (with or without facet) or combined (with or without facet), a new Solr document field is added for the property in the content item using this Modular Template (either a modular content type based on this template or a page with this template assigned as page metadata). The name of the field depends on the search facet type:
Unique - wmamodularcontent0[template identifier]0[property identifier]
Combined - wmamodularcontent0[property identifier]
Since combined facets are not template specific, the template identifier is not part of the field name. Unique facets are template specific, which is why the template identifier is part of the field name.
The search facets can subsequently be used in Solr queries (see https://wiki.gxsoftware.com/wiki/pages/viewpage.action?pageId=96469149 for some examples).
...
Exporting Modular Content
...