Adding Structured Data

Structuring data is a method to organize and classify content to a level of detail for general usage. Structured data comes in predefined lengths and formats. The organized and specific nature of structured data makes storage and retrieval efficient. 

For example, e-commerce applications have their data in the form of a product catalog in a JavaScriptObject Notation (JSON) or a Comma-separated Value (CSV) format. Product details such as product name, price, color, and description are stored in the form of structured data.

SearchAssist allows you to add structured data as a content source. Follow these steps to add structured data:

  1. Click the Sources menu tab.
  2. In the left pane, click Structured Data.
  3. On the Structured Data page, click + Add Data.
  4. Choose an option on the drop-down menu: Import Data or Add Manually.

Importing Structured Data

Use the Import Data option if you have a JSON or CSV file. Follow these steps to import structured data:

  1. On the Structured Data page, click + Add Data.
  2. Select Import Data.
  3. Drag and drop the file to the Import Structured Data dialog box. (Or click Browse and locate the file on your device.)
  4. Click Proceed.
  5. A dialog box with the validation status displays.
  6. Click OK.

We created sample files if you want to experiment with structured data in your Search Assist app.

  1. Open the Import Structured Data dialog box (see above).
  2. Go to the top right corner of the box.
  3. Click the download link for Sample CSV or Sample JSON.

Mapping Structured Data

After importing structured data, you need to configure display settings in the Results Template.

You can configure two display formats: Live Search and Page Results.

Live Search displays auto-populated options based on the partial keyword in the search bar and user search context.

Page Results displays search results with a pre-designed template. The options include:

  • List
  • Carousel
  • Grid

To open the Results Template page:

  1. Click the Indices menu tab.
  2. In the left pane, click Result Templates. The configuration page displays.

Single Template

To use the same default template for all types of results:

  1. Make sure the Result Groups toggle is in the OFF position.
  2. Click the Default Template field.
  3. Select an option.
  4. Click the Preview icon to see what the template looks like. (optional)
  5. Click the Customization button to format the template display.

Multiple Template Option

Instead of a single template for all display results, you can choose a different template for each content type (i.e. web links, FAQs, files, data).

  1. Make sure the Result Group toggle is in the ON position. SearchAssist auto-populates three fields with different content labels (web, faqs, files).
  2. Click a field in the Layout column and choose display type (list, carousel, or grid).
  3. Preview the display. (optional)
  4. Click the Customization button to format the template layout.
  5. Repeat steps to set the template for each content type.
  6. Click + Add to insert another row of content. (optional)
  7. Click Save.

Field Name

SearchAssist automatically creates a group called sys_content_type and with three values (web, faq, and file) and auto-populate the VALUES fields with these labels. In most cases, you won’t need to change the FIELD NAME group. If you do want something other than the default setting, you must first create a custom group. After that, return to the Results Groups page, click the FIELD NAME icon, and select an option in the drop-down menu.

Customizing Template Displays

Open the Customization page to format the template and map data to display fields. The number of fields that you need to map is different for each template option. A basic template with one text field needs only one mapping. A more robust template with an image, header, and text requires three mappings.

List
  1. Click the List type field and select an option: Plain or Classic (places a drop shadow on text boxes).
  2. Scroll down the left menu and select a template option.
  3. Review the display in the Preview field.
  4. Click a mapping field.
  5. Scroll through the drop-down menu and select a field.
  6. Enter a keyword into the search field. (optional)
  7. Repeat steps for other fields.
  8. Click the toggle to the ON position to make results clickable. (optional) The default setting is OFF.
  9. Click Save.

Testing Results

To test the configuration settings:

  1. Click the Test button on the Result Templates page.
  2. Enter a search term.
  3. Inspect the results.
  4. Click a result to open the result in a new browser tab (if you selected the Clickable option, see above).
  5. Return to the Configuration page and make adjustments as required.

Customizing results

On the Test results page, you can customize search results.

  1. Click the Customize button.
  2. Locate the result you want to modify.
  3. Hover the mouse on the resp
  4. Select an option.
  5. Repeat for other results. (optional)
  6. Click the X icon to close the page.

Manually Adding Structured Data

Use the Add Manually option to add one or more items to an imported catalog. Follow these steps:

  1. On the Structured Data page, click + Add Data.
  2. Select Add Manually.
  3. On the Add Manually dialog box, enter the code. For a sample JSON, click the {} icon in the top-right.
  4. Use the Indent option to let the application indent the code for you.
  5. Click Proceed.

SearchAssist displays the Structured Data page with the new record.

Sample Files

JSON

{

“firstName”: “Rack”,

“lastName”: “jackson”,

“gender”: “man”,

“age”: 24,

“address”: {

“streetAddress”: “126 Udhna”,

“city”: “san jone”,

“state”: “CA”,

“postalCode”: “394221”

},

“phoneNumbers”: [

{ “type”: “home”, “number”: “7383627627” }

]

}

CSV

1,”Eldon Base for stackable storage shelf, platinum”,Muhammed MacIntyre,3,-213.25,38.94,35,Nunavut,Storage & Organization,0.8

2,”1.7 Cubic Foot Compact “”Cube”” Office Refrigerators”,Barry French,293,457.81,208.16,68.02,Nunavut,Appliances,0.58

3,”Cardinal Slant-D Ring Binder, Heavy Gauge Vinyl”,Barry French,293,46.71,8.69,2.99,Nunavut,Binders and Binder Accessories,0.39

4,R380,Clay Rozendal,483,1198.97,195.99,3.99,Nunavut,Telephones and Communication,0.58

5,Holmes HEPA Air Purifier,Carlos Soltero,515,30.94,21.78,5.94,Nunavut,Appliances,0.5

6,G.E. Longer-Life Indoor Recessed Floodlight Bulbs,Carlos Soltero,515,4.43,6.64,4.95,Nunavut,Office Furnishings,0.37

7,”Angle-D Binders with Locking Rings, Label Holders”,Carl Jackson,613,-54.04,7.3,7.72,Nunavut,Binders and Binder Accessories,0.38

8,”SAFCO Mobile Desk Side File, Wire Frame”,Carl Jackson,613,127.70,42.76,6.22,Nunavut,Storage & Organization,

9,”SAFCO Commercial Wire Shelving, Black”,Monica Federle,643,-695.26,138.14,35,Nunavut,Storage & Organization,

10,Xerox 198,Dorothy Badders,678,-226.36,4.98,8.33,Nunavut,Paper,0.38

Managing Structured Data

Once you add or import structured data, you can perform the following actions:

  1. Search for a data record with a specific value.
  2. Filter the list using the Advanced Search to include multiple rules joined by AND or OR connectors.
  3. Edit a specific data record.
  4. Delete a specific data record or select multiple data records and delete them in bulk.
  5. View the last updated timestamp and user details.