Skip to content

Commit

Permalink
document supported search operators (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeldenker authored Dec 4, 2024
1 parent d69fd5b commit daff4d0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/api/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# API Docs

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

Run `npm run start` to start the development server.
19 changes: 19 additions & 0 deletions docs/search_operators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Supported search operators

* `A B C` - Searches for pages containing *all* of the terms A, B, or C. The terms are allowed to appear in different fields (url, title, body, etc.).

* `"A B C"` - Searches for pages containing the exact phrase "A B C" with the words in that specific order. The terms must appear in the same field.

* `site:example.com` - Restricts search results to only pages from the specified site example.com. It can also match subdomains `site:sub.example.com` or page prefixes `site:sub.example.com/page` which will both match `sub.example.com/page`, `sub.example.com/page/subpage`, `extra.sub.example.com/page` etc.

* `linkto:example.com` - Finds pages that contain links pointing to the specified domain example.com. Uses the same matching logic as `site:` queries.

* `intitle:A B` - Searches for pages where term A must appear in the title, while B can appear anywhere on the page.

* `inbody:A B` - Searches for pages where term A must appear in the main body text, while B can appear anywhere.

* `inurl:A B` - Searches for pages where term A must appear in the URL, while B can appear anywhere on the page.

* `exacturl:https://example.com` - Finds the page with exactly the specified URL. This is mostly used for debugging to see if a specific page is indexed.

* `A -B` - Searches for pages containing term A but not term B.

0 comments on commit daff4d0

Please sign in to comment.