Solr Index

Different field types have to be properly indexed in order to be searchable by Solr Backoffice.

Dates

Date fields have to be indexed as date type with the defaultDateValueResolver as the fieldValueProvider.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];solrIndexedType(identifier)[unique=true];type(code);fieldValueProvider;includeInResponse[default=false];
;offlineDate;BackofficeProduct;date;defaultDateValueResolver;;
;onlineDate;BackofficeProduct;date;defaultDateValueResolver;;

References

Item references such as catalogVersion for a Product should be indexed as long field with the defaultReferenceValueResolver as the fieldValueProvider.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];solrIndexedType(identifier)[unique=true];type(code);fieldValueProvider;includeInResponse[default=false];
;variantType;;long;defaultReferenceValueResolver;;

Catalog and CatalogVersion References

Catalog and CatalogVersion references for a Product can be indexed under different index field names with specific field value resolvers: catalogPKValueResolver and catalogVersionPKValueResolver.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];solrIndexedType(identifier)[unique=true];type(code);fieldValueProvider;includeInResponse[default=false];
;catalogPk;;long;catalogPKValueResolver;;
;catalogVersionPk;;long;catalogVersionPKValueResolver;;

Collections

Collections are represented as multi value fields. Depending on what's inside, a collection type has to be chosen, e.g. Supercategories for a Product should be indexed as long multi value fields with the collectionValueResolver.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];solrIndexedType(identifier)[unique=true];type(code);fieldValueProvider;multiValue;includeInResponse[default=false];
;supercategories;;long;collectionValueResolver;true;;;

The following example shows how localised collection of references could be indexed, e.g. keywords:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];solrIndexedType(identifier)[unique=true];fieldValueProvider;multiValue;localized[default=false];includeInResponse[default=false];
;keywords;;long;collectionValueResolver;true;true;

Collections of Category References

Category references for a Product can be indexed under different index field name with specific field value provider: categoryPKValueProvider.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];$solrIndexedType;type(code);fieldValueProvider;multiValue;localized[default=false];includeInResponse[default=false];
;categoryPk;;long;categoryPKValueProvider;true;; 

String Values

String property of an Item should be indexed as the text field.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];$solrIndexedType;type(code);localized[default=false];currency[default=false];multiValue[default=false];includeInResponse[default=false];useForSpellChecking[default=false];
;code;;text;;;;;;
;name;;text;true;;;;;

Enum Values

Enum properties should be indexed as string fields.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty; name[unique = true]; $solrIndexedType; type(code); fieldValueProvider; includeInResponse[default = false]; facetType(code)[default = 'MultiSelectOr']; facet[default = true];
; approvalStatus ; ; string ; solrEnumValueResolver ; ; ; ;

Numbers

Number properties can be indexed according to their type: long, double, int etc.

See the example in the impex fragment:

INSERT_UPDATE SolrIndexedProperty;name[unique=true];solrIndexedType(identifier)[unique=true];localized[default=false];currency[default=false];multiValue[default=false];includeInResponse[default=false];
;numberContentUnits;;double;;;;;