Default Initial Values

If you want to learn more about how the RapidUI HawkSearch Config object is assembled, take a look at the documentation, for more in-depth information about defaults and specifications on each parameter.

Hawksearch.init({
  clientId: '',
  index: '',
  autocomplete: {
    endpointUrl: 'https://searchapi-dev.hawksearch.net',
    recommendationsEnabled: false,
    decodeQuery: true,
    minCharacterCount: 1
  },
  search: {
    endpointUrl: 'https://searchapi-dev.hawksearch.net',
    url: '/search',
    facetExclusionPrefix: '-',
    itemTypes: {
      default: 'content',
      productValues: '["item", "product"]'
    },
    queryStringMappings: {
      disableSpellcheck:'disableSpellcheck',
      page: 'page',
      pageSize: 'pageSize',
      query: 'query',
      searchWithin: 'searchWithin',
      sort: 'sort'
    },
    decodeQuery: true,
    decodeFacetValues: true
  },
  urlPrefixes: {
    assets: '',
    content: ''
  },
  recommendations: {
    endpointUrl: ''
  },
  tracking: {
    enabled: true,
    endpointUrl: 'https://tracking-dev.hawksearch.net'
  },
  variants: {
    baseFacetCountOnVariants: false,
    enabled: true,
    fieldPrefix: '',
    fieldMapping: {},
    trackUsingVariant: false
  },
  breakpoints: {},
  components: {
    'conversationalsearch': {
      string: {
        placeholder: 'Enter a message...'
      },
      prompt: {
        instructions: `
        	You are a recommendation agent, specialized in finding the perfect match for a user.
          Answer the question from the user extensivelly.
          You will be provided with an array of products as DATA.
          Create 2 suggested questions that a user could ask about this data that follows.
          Use new lines to seperate them. Make them short.
          Say something like 'Try one of these suggested questions:' followed by the questions you generate.
          Only use the information passed to you as DATA to answer the questions asked.
          Do not provide any information on amount of DATA you currently have.
        `
      }
    },
    'imagesearch-field': {
      searchOnKeyPress: false,
      searchMinCharacterCount: 10,
      searchDebounceValue: 350,
      strings: {
        placeholder: 'Describe an image you want to find'
      }
    },
    'search-field': {
      strings: {
        placeholder: 'Enter Keyword'
      },
      disableAutofill: false
    },
    'smartresponse': {
      string: {
        header: 'SmartResponse',
        noresults: 'No Results found'
      },
      prompt: {
        instructions: `
          You are a recommendation agent, specialized in finding the perfect match for a user.
          Answer the question from the user extensivelly.
          You will be provided with a user input and an array of products.
          Based on the user input and products, determine a maximum of 3 of the most relevant products based on the user input.
          Do not provide any information about amount of products you're returning.
        `,
        schema: {
          "name": "smartresponse_summary",
          "description": "Recommedation message and product details which includes name, description, url, price and imageUrl",
          "strict": true,
          "schema": {
            "type": "object",
            "properties": {
              "recommendation": {
                "type": "string"
              },
              "products": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "price": {
                      "type": "number"
                    },
                    "imageUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "url",
                    "description",
                    "price",
                    "imageUrl"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "recommendation",
              "products"
            ],
            "additionalProperties": false
        	}
        }
      }
    },
    'visualsearch-field': {
      string: {
        dragImageMessage: 'Drag an image here or ',
        uploadImageMessage: 'upload an image',
        dropImageMessage: 'Drop an image here',
        errorMessage: 'Drop an image here'
      }
    }
  },
  css: {
    customStyles: '',
    defaultStyles: true
  },
  formatting: {
    cultureIsoCode: 'en_US',
    currencyIsoCode: 'USD'
  },
  placeholderImageURL: string,
  seo: {
    title: {
      prefix: '',
      suffix: ''
    }
  },
  shadowDom: true
});