Search code examples
solrsap-commerce-cloud

SOLR & Hybris: Different Cores, Multiple Indexer Type with the same Composed Type


Is it possible to create two different indexedType with the same composed Type? Will it appear as two different cores in localhost:8983?

I successfully created an indexedType in Hybris 6.3 named myMediaVideoType with a composed type equal to Media. There is an existing indexedType named myMediaType having the same composed type (Media).

The problem is, I want it to appear in localhost:8983 (in core section), but it doesn't appear there.

Any help will be appreciated, thanks!


Solution

  • It would be good if you tell the exact scenario, one can suggest a better solution. Anyway, let me answer your questions.

    Is it possible to create two different indexedType with the same composed Type?

    Yes, you can create as many indexedType you want with the same Composed Type.

    Will it appears as two different cores in localhost:8983?

    Yes, if you configure different SolrFacetSearchConfig for each IndexedType with different indexNamePrefix value

    A snippet of Impex:

    # Declare the indexed type
    INSERT_UPDATE SolrIndexedType;identifier[unique=true];type(code);
    ;myMediaType;Media;
    ;myMediaVideoType;Media;
    
    # Declare the FacetSearchConfig
    INSERT_UPDATE SolrFacetSearchConfig;name[unique=true];description;indexNamePrefix;
    ;myMediaTypeFSC;facetSearchConfigDescription1;myMediaType;
    ;myMediaVideoTypeFSC;facetSearchConfigDescription2;myMediaVideoType;