A message is published to this topic when search results are retrieved or when an error is returned while searching for a product. If search results are retrieved successfully, those results are published with the message. If an error occurs, the error is published with the message.

$.Topic(pubsub.topicNames.SEARCH_RESULTS_UPDATED).publishWith(searchResults, message);
Arguments

searchResults: The contents of this argument vary depending on whether the search was successful or not. If the search was successful, the argument consists of a JSON object that includes the search results and meta-data about the search, for example:

{
   searchResults : Array[5],
   isNewSearch:false,
   navigation : Array[5],
   pageCount : 15,
   pagingActionTemplate : JSONObject,
   recordOffSet : 0,
   recordsPerPage : 5,
   searchAdjustments :JSONObject,
   totalRecordsFound : 74
   breadcrumbs:JSONObject
}

The properties in the successful search JSON object include:

{
   "product.category" : ["Cameras and Camcorders"],
   "product.language" : ["en"],
   "record.type" : ["camera", "sku-camera"],
   "sku.listingId" : ["camera_1"],
   "product.priceRange" : ["JPY0 - JPY9"],
   "sku.activePrice" : ["3.990000"],
   "product.creationDate" : ["1466057558000"],
   "sku.url" : ["atgrep:/ProductCatalog/sku-camera/
      camerasku_1_55?_product=camera_1&locale=en&priceListPair=
      salePrices_listPrices"],
   "product.priceListPair" : ["salePrices_listPrices"],
   "product.active" : ["1"],
   "sku.salePrice" : ["3.990000"],
   "sku.creationDate" : ["1466057558000"],
   "record.source" : ["ProductCatalog"],
   "product.url" : ["atgrep:/ProductCatalog/sku-camera/
      camerasku_1_55?_product=camera_1&locale=en&priceListPair=
      salePrices_listPrices"],
   "sku.availabilityStatus" : ["OUTOFSTOCK"],
   "parentCategory.displayName" : ["Cameras and Camcorders"],
   "Endeca.Document.Language" : ["en"],
   "product.daysAvailable" : ["0"],
   "record.type.raw" : ["camera", "sku-camera"],
   "sku.baseUrl" : ["atgrep:/ProductCatalog/sku-camera/
      camerasku_1_55"],
   "product.dateAvailable" : ["1466057558000"],
   "sku.repositoryId" : ["camerasku_1_55"],
   "product.baseUrl" : ["atgrep:/ProductCatalog/sku-camera/
      camerasku_1_55"],
   "sku.listPrice" : ["399.990000"],
   "sku.onSale" : ["0"],
   "record.id" : ["sku-camera-camerasku__1__55..camera__1.en.
      salePrices__listPrices"],
   "product.route" : ["/digital-compact-system-camera/product/
      camera_1"],
   "product.longDescription" : ["This digital compact system camera
      14.1-megapixel,\n    4/3 Live MOS sensor allows you to
      capture sharp photos and record high-definition video footage with
      up\n    to 1920 x 1080 resolution. Built-in Wi-Fi lets
      you easily share stored files.\n    "],
   "sku.listingOptionIndex" : ["10000"],
   "id" : ["camera_1"],
   "repositoryId" : ["camera_1"],
   "displayName" : "Digital Compact System Camera",
   "shippingSurcharge" : 0,
   "listPrice" : 399.99,
   "salePrice" : null,
   "route" : "/digital-compact-system-camera/product/camera_1",
   "primaryImageAltText" : ["Digital Compact System Camera"],
   "primaryImageTitle" : ["Digital Compact System Camera"],
   "primaryLargeImageURL" : "/ccstore/v1/images/?source=
      /file/v2/products/OM_D_E_M10_LARGE.jpg&height=940&width=940",
   "primarySmallImageURL" : "/ccstore/v1/images/?source=
      /file/v2/products/OM_D_E_M10_LARGE.jpg&height=300&width=300",
   "primaryThumbImageURL" : "/ccstore/v1/images/?source=
      /file/v2/products/OM_D_E_M10_LARGE.jpg&height=100&width=100",
   "primaryMediumImageURL" : "/ccstore/v1/images/?source=
      /file/v2/products/OM_D_E_M10_LARGE.jpg&height=475&width=475",
   "primaryFullImageURL" : "/ccstore/v1/images/?source=
      /file/v2/products/OM_D_E_M10_LARGE.jpg",
   "childSKUs" : [{
         "salePrice" : "3.990000",
         "listPrice" : "399.990000",
         "repositoryId" : ["camerasku_1_55"],
         "largeImage" : {
            "url" : ""
         },
         "smallImage" : {
            "url" : ""
         },
         "thumbnailImage" : {
            "url" : ""
         }
      }
   ],
   "maxActivePrice" : "399.990000",
   "minActivePrice" : "3.990000"
}
"refinements": [
  {
    "multiSelect": false,
    "navigationState":
        "?N=4058976224&Nr=AND%28product.priceListPair%3AsalePrices_listPrices
        %2Cproduct.language%3Aen%29&Nrpp=12&Ntl=en&Ntt=cam&language=en&
        searchType=simple&visitId=-14ddf4e9%3A156217da656%3A-582e-10.170.102.150&
        visitorId=1298EspxGMOA_YEnEkrCS9sDr1JYUdQ6jpex06ADSHQzGuU30A4",
    "contentPath": "\/guidedsearch",
    "count": 2,
    "@class": "com.endeca.infront.cartridge.model.Refinement",
    "siteRootPath": "\/pages\/Default\/services",
    "siteState": {
      "contentPath": null,
      "siteId": "@error:siteNotFound",
      "@class": "com.endeca.infront.site.model.SiteState",
      "siteDisplayName": null,
      "validSite": false,
      "properties": {

      },
      "siteDefinition": null,
      "matchedUrlPattern": null
    },
    "label": "All Products",
    "properties": {
      "dimval.prop.category.ancestorCatalogIds": "cloudLakeCatalog",
      "dimval.prop.category.rootCatalogId": "cloudLakeCatalog",
      "dimval.prop.displayName_en": "All Products",
      "dimval.prop.category.repositoryId": "AllProdPagination",
      "dimval.prop.category.catalogs.repositoryId":
        "cloudCatalog,cloudLakeCatalog",
      "record.id":
        "atgrep:\/ProductCatalog\/category\/AllProdPagination?
         categoryPath=\/AllProdPagination",
      "DGraph.Spec": "AllProdPagination"
    }
  },
  {
    "multiSelect": false,
    "navigationState":
        "?N=3881554706&Nr=AND%28product.priceListPair%3AsalePrices_listPrices%
        2Cproduct.language%3Aen%29&Nrpp=12&Ntl=en&Ntt=cam&language=en&
        searchType=simple&visitId=-14ddf4e9%3A156217da656%3A-582e-10.170.102.150&
        visitorId=1298EspxGMOA_YEnEkrCS9sDr1JYUdQ6jpex06ADSHQzGuU30A4",
    "contentPath": "\/guidedsearch",
    "count": 1,
    "@class": "com.endeca.infront.cartridge.model.Refinement",
    "siteRootPath": "\/pages\/Default\/services",
    "siteState": {
      "contentPath": null,
      "siteId": "@error:siteNotFound",
      "@class": "com.endeca.infront.site.model.SiteState",
      "siteDisplayName": null,
      "validSite": false,
      "properties": {

      },
      "siteDefinition": null,
      "matchedUrlPattern": null
    },
    "label": "Blockbuster",
    "properties": {
      "dimval.prop.category.ancestorCatalogIds": "cloudLakeCatalog",
      "dimval.prop.category.rootCatalogId": "cloudLakeCatalog",
      "dimval.prop.displayName_en": "Blockbuster",
      "dimval.prop.category.repositoryId": "topLeaf",
      "dimval.prop.category.catalogs.repositoryId":
        "cloudCatalog,SiteContextDummyCatalog,ClassicalMoviesCatalog,
         cloudLakeCatalog",
      "record.id": "atgrep:\/ProductCatalog\/category\/topLeaf?
        categoryPath=\/topLeaf",
      "DGraph.Spec": "topLeaf"
    }
  },

…Additional refinements here…

],
"multiSelect": false,
"@type": "RefinementMenu",
"name": "product.category",
"ancestors": [

],
"displayName": "Category",
"dimensionName": "product.category",
"whyPrecedenceRuleFired": null
},
"pagingActionTemplate" : {
      "navigationState" :
         "?&Ntl=en&Ntt=camera&language=en&searchType=simple",
      "contentPath" : "/guidedsearch",
      "@class" :
         "com.endeca.infront.cartridge.model.NavigationAction",
      "siteRootPath" : "/pages/Default/services",
      "siteState" : {
         "contentPath" : null,
         "siteId" : "@error:siteNotFound",
         "@class" : "com.endeca.infront.site.model.SiteState",
         "siteDisplayName" : null,
         "validSite" : false,
         "properties" : {},
         "siteDefinition" : null,
         "matchedUrlPattern" : null
      },
      "label" : null
}
"breadcrumbs" : {
   "removeAllAction" : {
      "navigationState" : "?Ntl=en&language=en&searchType=simple&
         visitId=null&visitorId=null",
      "contentPath" : "/guidedsearch",
      "@class" :
         "com.endeca.infront.cartridge.model.NavigationAction",
      "siteRootPath" : "/pages/Default/services",
      "siteState" : {
         "contentPath" : null,
         "siteId" : "@error:siteNotFound",
         "@class" : "com.endeca.infront.site.model.SiteState",
         "siteDisplayName" : null,
         "validSite" : false,
         "properties" : {},
         "siteDefinition" : null,
         "matchedUrlPattern" : null
      },
      "label" : null
   },
   "refinementCrumbs" : [],
   "geoFilterCrumb" : null,
   "@type" : "Breadcrumbs",
   "endeca:auditInfo" : {
      "ecr:innerPath" : "breadcrumbs",
      "ecr:resourcePath" : "/pages/Default/services/guidedsearch"
   },
   "searchCrumbs" : [{
         "@class" :
            "com.endeca.infront.cartridge.model.SearchBreadcrumb",
         "terms" : "camera",
         "removeAction" : {
            "navigationState" :
               "?Nr=AND%28product.priceListPair%3AsalePrices_listPrices%
               2Cproduct.language%3Aen%29&Nrpp=12&Ntl=en&language=en&
               searchType=simple&visitId=null&visitorId=null",
            "contentPath" : "/guidedsearch",
            "@class" :
             "com.endeca.infront.cartridge.model.NavigationAction",
            "siteRootPath" : "/pages/Default/services",
            "siteState" : {
               "contentPath" : null,
               "siteId" : "@error:siteNotFound",
               "@class" :
                    "com.endeca.infront.site.model.SiteState",
               "siteDisplayName" : null,
               "validSite" : false,
               "properties" : {},
               "siteDefinition" : null,
               "matchedUrlPattern" : null
            },
            "label" : null
         },
         "correctedTerms" : null,
         "key" : "All",
         "matchMode" : "allpartial"
      }
   ],
   "rangeFilterCrumbs" : []
}

When the search has failed, the searchResults object contains details about the error, including:

For example:

{
    "message":"Unable to perform a search at this time",
    "status":"500",
    "errorCode":"31040"
}

message: The second argument returned for the SEARCH_RESULTS_UPDATED topic contains a JSON array that includes either a success or failure message and the SearchViewModel object, for example:

[{
    message: "success",
    requestor: SearchViewModel
}]

In the case of a failed search, this message property has a value of fail.

[{"message":"fail"}]
Memory enabled

Yes


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