3 Replies Latest reply on Jun 26, 2020 7:05 AM by Dirk Zabinsky

    How to add attribute values to elastic

    Dirk Zabinsky New Member

      I'm trying to figure out how to add attribute values of some specific attributes to the elastic search index.
      (MDM Product 360, Version 10)

      I created an export with purpose "Full-text search" and for common fields on entities and fields of "usual" subentities this already works fine.
      But I'm struggling with attribute values, because I don't know how to set the qualifications. I tried to use for the qualifications the Attribute Name (Pattern", Language (19)  for the value and the value identifier (DEFAULT).

      When i execute the export to build the index i got following error:

      Data synchronization requires "qualifications" for each entry of the "fields" to be based on repository.("identifier":=Value),DslParseException=Error while interpreting object "ArticleAttributeValue.Value('Pattern',19,'DEFAULT')":

      Qualifier 'name': The enumeration 'Item attributes' does not contain the value ''Pattern''


      But "Pattern" is a valid attribute name and exists in the system.

      How do I have to provide the qualifications to add Attribute Values to the search index?
      And how do i have to use the keyValue property correctly?

      Do you have an example?

      This is how i tried it:

      {

      "rootEntities": [{

      "identifier": "Article",

      "parentEntityIdentifier": "Product2G",

      "fields": [{

      "identifier": "SupplierAID",

      "dataType" : "text",

      "searchProperties": {

      "searchable": true,

      "sortable": true,

      "facetable": true

      }

      },

      {

      "identifier": "EAN",

      "dataType" : "text",

      "searchProperties": {

      "searchable": true,

      "sortable": true,

      "facetable": true

      }

      }

      ],

      "subEntities": [

      {

      "identifier": "ArticleAttributeValue",

      "fields": [{

      "identifier": "Value",

      "dataType" : "text",

      "searchProperties": {

      "searchable": true,

      "sortable": true,

      "facetable": true

      },

      "qualifications": ["'Pattern',19,'DEFAULT'"]

      }],

      "keyValue": {

      "dataType": "text",

      "searchProperties" : {

      "searchable": true,

      "sortable": true,

      "facetable": true

      }

      }

      }

      ]

      }]

      }




        • 1. Re: How to add attribute values to elastic
          Stefan Reinhardt Guru

          Hi Dirk,

           

          the following will add all attributes indexed generically at the bottom:

          {"identifier": "ArticleAttribute",

          "keyValue": {

          "dataType": "keyword",

          "searchProperties": {

          "searchable": true,

          "sortable": true,

          "facetable": true

          }

          }

          }

           

          The accelerator package has examples of search indexes that include that as well. Moving a specific attribute up into the top facets is not possible I believe.

          Perhaps filtering attributes on export template level may work. I haven't tested myself.


          Does that help?

          Best,

          Stefan

          1 of 1 people found this helpful
          • 2. Re: How to add attribute values to elastic
            Lokesh Kumar Guru

            Hi,

             

            Error says that there is no column with identifier Value in subentity ArticleAttribute. That's correct, because Value is in ArticleAttributeValue subentity.

             

            Did you use DataType filter on attribute name(key) available in Export Template  ?

             

            - Lokesh Kumar

            • 3. Re: How to add attribute values to elastic
              Dirk Zabinsky New Member

              Thanks Stefan,

              i thought it might be possible to qualify exactly the attribute value i want to use in the index as i did for other subentities.

              But with your approach and using the datatype filter on the attribute submodule i get the result i wanted to achieve.

              BR
              Dirk