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:
- Click the Sources menu tab.
- In the left pane, click Structured Data.
- On the Structured Data page, click + Add Data.
- 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:
- On the Structured Data page, click + Add Data.
- Select Import Data.
- Drag and drop the file to the Import Structured Data dialog box. (Or click Browse and locate the file on your device.)
- Click Proceed.
- A dialog box with the validation status displays.
- Click OK.
We created sample files if you want to experiment with structured data in your Search Assist app.
- Open the Import Structured Data dialog box (see above).
- Go to the top right corner of the box.
- 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:
To open the Results Template page:
- Click the Indices menu tab.
- In the left pane, click Result Templates. The configuration page displays.
Single Template
To use the same default template for all types of results:
- Make sure the Result Groups toggle is in the OFF position.
- Click the Default Template field.
- Select an option.
- Click the Preview icon to see what the template looks like. (optional)
- 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).
- Make sure the Result Group toggle is in the ON position. SearchAssist auto-populates three fields with different content labels (web, faqs, files).
- Click a field in the Layout column and choose display type (list, carousel, or grid).
- Preview the display. (optional)
- Click the Customization button to format the template layout.
- Repeat steps to set the template for each content type.
- Click + Add to insert another row of content. (optional)
- 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
- Click the List type field and select an option: Plain or Classic (places a drop shadow on text boxes).
- Scroll down the left menu and select a template option.
- Review the display in the Preview field.
- Click a mapping field.
- Scroll through the drop-down menu and select a field.
- Enter a keyword into the search field. (optional)
- Repeat steps for other fields.
- Click the toggle to the ON position to make results clickable. (optional) The default setting is OFF.
- Click Save.
Testing Results
To test the configuration settings:
- Click the Test button on the Result Templates page.
- Enter a search term.
- Inspect the results.
- Click a result to open the result in a new browser tab (if you selected the Clickable option, see above).
- Return to the Configuration page and make adjustments as required.
Customizing results
On the Test results page, you can customize search results.
- Click the Customize button.
- Locate the result you want to modify.
- Hover the mouse on the resp
- Select an option.
- Repeat for other results. (optional)
- 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:
- On the Structured Data page, click + Add Data.
- Select Add Manually.
- On the Add Manually dialog box, enter the code. For a sample JSON, click the {} icon in the top-right.
- Use the Indent option to let the application indent the code for you.
- 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:
- Search for a data record with a specific value.
- Filter the list using the Advanced Search to include multiple rules joined by AND or OR connectors.
- Edit a specific data record.
- Delete a specific data record or select multiple data records and delete them in bulk.
- View the last updated timestamp and user details.