You can use the POST method to create or replace the configuration of a search interface.

For example, the following POST request imports configuration of a search interface named All:

POST /gsadmin/v1/cloud/searchInterfaces/All

The following JSON code illustrates one possible configuration of the search interface All:

{
  "ecr:type": "search-interface",
  "crossFieldMatch": "always",
  "fields": [
    {
      "attribute": "product.id"
    },
    {
      "attribute": "product.sku"
    },
    {
      "attribute": "product.code"
    },
    {
      "attribute": "product.brand.name"
    },
    {
      "attribute": "product.category"
    },
    {
      "attribute": "product.name"
    },
    {
      "attribute": "product.long_desc"
    },
    {
      "attribute": "ecr:crossField"
    }
  ]
}

Note: The JSON object that configures a search interface does not specify the name of the search interface. Instead, the name of the search interface is assumed to be the same as the name of the subfolder (that is, All) where the search interface is stored.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices