1 Reply Latest reply: Sep 20, 2013 6:01 AM by Arjun99 RSS

    To index a property which is a map.

    Girish V U

      I am trying to index a property which is a map at repository level as shown,

       

      customcatalog.xml snippet (this is present in 'product' item-descriptor)

              <table name="test_table" id-column-name="product_id" multi-column-name="key" type="multi">

                  <property name="mapProperty" category-resource="general" column-name="mapProperty" component-data-type="string" display-name="Map Property" data-type="map" />

              </table>

       

      And the corresponding PSOC snippet is (Each Product is a record,so this is present inside Product item) ,

      <item property-name="mapProperty" is-multi="true" map-iteration-type="wildcard">

                  <properties>

                   <property name="butterType" type="string" text-searchable="true"/>

                     <property name="coffeeOrigin" type="string" is-dimension="true" text-searchable="true"/>

                     <property name="juiceType" type="string" is-dimension="false" text-searchable="true"/>

                </properties>

         </item>


      But as soon as I start indexing it fails with the following error:

      15:39:03,519 ERROR [STDERR] Exception in thread "index-/atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin"

      15:39:03,520 ERROR [STDERR] java.lang.NullPointerException: Property value cannot be null (dimval.display_name)

      15:39:03,525 ERROR [STDERR]     at com.endeca.itl.record.PropertyValue.<init>(PropertyValue.java:39)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.RecordStoreDocumentSubmitterSessionImpl.submitRecord(RecordStoreDocumentSubmitterSessionImpl.java:393)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.AbstractRecordStoreAggregateSession.submitRecord(AbstractRecordStoreAggregateSession.java:327)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.PerApplicationExporter.exportRecords(PerApplicationExporter.java:324)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.PerApplicationExporter$1.performActionForApplication(PerApplicationExporter.java:248)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.configuration.IndexingApplicationConfiguration.executeForEachApplication(IndexingApplicationConfiguration.java:422)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.PerApplicationExporter.export(PerApplicationExporter.java:244)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.PerApplicationExporter.performBaselineUpdate(PerApplicationExporter.java:371)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.admin.IndexingTask.doTask(IndexingTask.java:420)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.admin.IndexingTask.performTask(IndexingTask.java:363)

      15:39:03,525 ERROR [STDERR]     at atg.endeca.index.admin.IndexingPhase$IndexingTaskJob.invoke(IndexingPhase.java:475)

      15:39:03,525 ERROR [STDERR]     at atg.common.util.ThreadDispatcherThread.run(ThreadDispatcherThread.java:178)


      As far as ProductCatalogSimpleIndexingAdmin is concerned,

      1) Pre-Indexing ,i.e., atg/commerce/endeca/index/CategoryTreeService is successfull.

      But the second phase ,i.e., RepositoryExport fails.

      i.e.,


      /atg/commerce/endeca/index/SchemaExporter --> Cancelled

      /atg/commerce/endeca/index/CategoryToDimensionOutputConfig --> Cancelled

      /atg/commerce/endeca/index/RepositoryTypeDimensionExporter --> Complete(Failed)

      /atg/commerce/search/ProductCatalogOutputConfig --> Cancelled

       

      Endeca Indexing is cancelled (Obviously ... ).

      '

      Upon, further investigation of Component RepositoryTypeDimensionExporter which is the component that actually failed , shows the following output for the given item i.e., 'mapProperty'

       

      <RECORD>

        <PROP NAME="dimval.dimension_spec">

        <PVAL>item.type</PVAL>

        </PROP>

        <PROP NAME="dimval.display_name">

        <PVAL></PVAL>

        </PROP>

        <PROP NAME="dimval.prop.displayName_en">

        <PVAL></PVAL>

        </PROP>

        <PROP NAME="dimval.qualified_spec">

        <PVAL>item.type:valuesMap</PVAL>

        </PROP>

        <PROP NAME="dimval.spec">

        <PVAL>valuesMap</PVAL>

        </PROP>

        <PROP NAME="dimval.parent_spec">

        <PVAL>item.type</PVAL>

        </PROP>

        </RECORD>

       

      The dimval.displayName is empty as shown above and if I understand it correctly ,it comes from display-name attribute from customcatalog.xml (which we have added as  display-name="Map Property").

       

      Please let me know if somebody has faced this issue before or if I am missing something here.

       

      Cheers,

      Girish