Search Tutorial
This tutorial will give you a quick introduction to how to upload and query data from GroupBy Cloud.
Prerequisites
To perform this procedure, you’ll need:
- An account at groupbycloud.com and have an endpoint that allows you to upload and query data.
- You have administrative access to your Command Center
- Command line to run
curl
(Terminal in Mac, Cygwin in Windows) commands to upload and query data
Note: Curl is installed by default in most linux environments and you can download a curl port for Windows here.
What you’ll do
This tutorial will help you to:
- Create a search data file
- Create a config file
- Upload your data
- Query the data
- Review search result returned
- Adding Navigations and Refinements
Sample data
You can use your data or GroupBy sample data available at Search Data File.
Your first upload
Run the upload command, sending both files to your endpoint:
Refer the Upload Data API to send a test request. Or you can the HTTP request maker below:
Data Query and Response
Let’s query your data. You can do this via either of these options:
- Command line
curl
- By using the Ref App
- You can execute a search using the HTTP request maker below.
Note: The reference application, also known as ref app, can be used to see the raw data and apply the business rules from any Command Center area.
Add Navigations
Now let’s define some Dynamic Navigation and view your results in the Reference Application.
Log into your Command Center. Open Dynamic Navigation section and click Add Dynamic Navigation.
In this instance, we’ll use the property name: “gender” and give it a display name of “Gender”. Leave all the other defaults and click save.
See Navigations returned
Now when we run our search command with a more generic query of shoes
. We will see the returned availableNavigation
section populated with the Gender navigation and the two refinements, “Women”, and “Men”. These two refinements are based on the returned data, and show the number of records that would be shown if you refined by these filters.
Add refinements into the query
We can add those refinements into the query (note, we reduced the fields
array to just show id
, so that the response is smaller - title
is always returned in the response).
The navigation that we refined by now shows up in the selectedNavigation
property and there are 5 corresponding records that are returned. (The available navigation is now empty as there is no more ways of further filtering the records, given the navigations that we have created.)
Congratulations, you’ve completed your first upload and executed your queries!