2.7 KiB
2.7 KiB
title |
---|
Search |
Quartz supports two modes of searching through content.
Full-text
Full-text search is the default in Quartz. It produces results that exactly match the search query. This is easier to setup but usually produces lower quality matches.
# the default option
enableSemanticSearch: false
Natural Language
Natural language search is powered by Operand. It understands language like a person does and finds results that best match user intent. In this sense, it is closer to how Google Search works.
Natural language search tends to produce higher quality results than full-text search.
Here's how to set it up.
- Create an Operand Account on their website.
- Go to Dashboard > Settings > Integrations.
- Follow the steps to setup the GitHub integration. Operand needs access to GitHub in order to index your digital garden properly!
- Head over to Dashboard > Objects and press
(Cmd + K)
to open the omnibar and select 'Create Collection'.- Set the 'Collection Label' to something that will help you remember it.
- You can leave the 'Parent Collection' field empty.
- Click into your newly made Collection.
- Press the 'share' button that looks like three dots connected by lines.
- Set the 'Interface Type' to
object-search
and click 'Create'. - This will bring you to a new page with a search bar. Ignore this for now.
- Go back to Dashboard > Settings > API Keys and find your Quartz-specific Operand API key under 'Other keys'.
- Copy the key (which looks something like
0e733a7f-9b9c-48c6-9691-b54fa1c8b910
). - Open
data/config.yaml
. SetenableSemanticSearch
totrue
andoperandApiKey
to your copied key.
- Copy the key (which looks something like
# the default option
enableSemanticSearch: true
operandApiKey: "0e733a7f-9b9c-48c6-9691-b54fa1c8b910"
- Make a commit and push your changes to GitHub. See the notes/hosting page if you haven't done this already.
- This step is required for Operand to be able to properly index your content.
- Head over to Dashboard > Objects and select the collection that you made earlier
- Press
(Cmd + K)
to open the omnibar again and select 'Create GitHub Repo'- Set the 'Repository Label' to
Quartz
- Set the 'Repository Owner' to your GitHub username
- Set the 'Repository Ref' to
master
- Set the 'Repository Name' to the name of your repository (usually just
quartz
if you forked the repository without changing the name) - Leave 'Root Path' and 'Root URL' empty
- Set the 'Repository Label' to
- Wait for your repository to index and enjoy natural language search in Quartz! Operand refreshes the index every 2h so all you need to do is just push to GitHub to update the contents in the search.