Build Search for a Job Board
Learn how to build a job board with Trieve
This guide will help you set up and run a demo using a sample job listing dataset on the Trieve platform. Follow the steps below to get everything working.
Steps to Set Up the Demo
-
Clone the repository:
-
Install the required dependencies:
This demo uses Bun as a runtime. Install Bun by running:
Install the dependencies by running:
-
Create an account on Trieve:
Go to Trieve Dashboard and create an account.
-
Create a new dataset and copy the dataset ID.
You can either create a dataset on the Trieve Dashboard or use our CLI
-
Create a new API key and copy the API key.
-
Create an
.env
file in the root of the project and add the following environment variables: -
Download the dataset
-
Run the demo:
-
View the results
Head over to https://search.trieve.ai and select your dataset.
Try out a few sample queries like
software engineer at google
or
show me some listings knowing I have experience as a mechanic
Breakdown of the script
Creating a data model to represent the data
When we receive the CSV data, we need to turn it into a data model to be able to effectively pull the data out of it. The data model for this CSV looks like:
Creating the Searchable Chunk HTML
\n\n
between each field to separate them so that the model can differentiate between them.The following function transforms job data into the searchable chunk HTML:
Creating a Chunk
To efficiently upload data, we divide it into chunks. Here’s the code snippet for creating a chunk with the data:
Checkout the api reference for the upload API to view all of the parameters that can be passed in with the chunk.
By following this guide, you should be able to set up and run the demo successfully. If you encounter any issues, refer back to the steps and ensure all configurations are correctly set up.