You can use
GenerativePropertyAccessor
to create dynamic endeca properties during indexing.
Try to follow what is being done for prices. See the link -
Sample ref-
public class StockAttributesAccessor extends GenerativePropertyAccessor {
@Override
protected Map<String, Object> getPropertyNamesAndValues(Context arg0,
RepositoryItem pItem, String propertyName, PropertyTypeEnum arg3,
boolean arg4) {
Map<String, Object> outputStockProperties = new HashMap<String, Object>();
//apply logic for store/stock, and keep adding keys to map. each key is a different endeca property
outputStockProperties.put("product." + dynamicKeyName, attributeValue);
return outputStockProperties;
}
}
PCOC- something like
<property name="stock" text-searchable="true" is-dimension="true property-accessor="/<path to accessor>/StockAttributesAccessor" multiselect-type="multi-or"/>
Hope this helps.
Thanks
Sushant