web search done right
trystract.com -> stract.com
Mikkel Denker54fe19ddf6d4
diff --git a/README.md b/README.mdindex 177f3e2a..d108307b 100644--- a/README.md+++ b/README.md@@ -2,16 +2,16 @@<p align="center"><img src="git-assets/big-logo.svg" height="120" /><br />- <a target="_blank" href="https://docs.trystract.com">+ <a target="_blank" href="https://docs.stract.com"><img src="https://img.shields.io/badge/overview-docs-0b7bff?labelColor=white" style="max-width: 100%;"></a>- <a target="_blank" href="https://trystract.com/beta/api/docs">+ <a target="_blank" href="https://stract.com/beta/api/docs"><img src="https://img.shields.io/badge/api-docs-0b7bff?labelColor=white" style="max-width: 100%;"></a></p><br />-Stract is an open source web search engine hosted at [trystract.com](https://trystract.com/) targeted towards tinkerers and developers.+Stract is an open source web search engine hosted at [stract.com](https://stract.com/) targeted towards tinkerers and developers.<br /><p align="center">@@ -35,13 +35,13 @@ Stract is an open source web search engine hosted at [trystract.com](https://try* And much more!# π©βπ» Setup-We recommend everyone to use the hosted version at [trystract.com](https://trystract.com/), but you can also follow the steps outlined in [CONTRIBUTING.md](CONTRIBUTING.md) to setup the engine locally.+We recommend everyone to use the hosted version at [stract.com](https://stract.com/), but you can also follow the steps outlined in [CONTRIBUTING.md](CONTRIBUTING.md) to setup the engine locally.# βπΌ LicenseStract is offered under the terms defined under the [LICENSE.md](LICENSE.md) file.# π¬ Contact-You can contact us at [[email protected]](mailto:[email protected]) or come hang out in our [Discord](https://discord.gg/BmzKHffWJM) or [Matrix](https://matrix.to/#/#stract:matrix.org) server.+You can contact us at [[email protected]](mailto:[email protected]) or come hang out in our [Discord](https://discord.gg/BmzKHffWJM) or [Matrix](https://matrix.to/#/#stract:matrix.org) server.# π Thank you!We truly stand on the shoulders of giants and this project would not have been even remotely feasible without them. An especially huge thank you todiff --git a/configs/crawler/crawler.toml b/configs/crawler/crawler.tomlindex 6b62a4b3..bde211cc 100644--- a/configs/crawler/crawler.toml+++ b/configs/crawler/crawler.toml@@ -12,6 +12,6 @@ token = "<user_agent_token>" # e.g. 'StractBot'[s3]access_key = "<access_key>"bucket = "crawl"-endpoint = "http://s3.trystract.com"+endpoint = "http://s3.stract.com"folder = "test"secret_key = "<secret_key>"diff --git a/core/Cargo.toml b/core/Cargo.tomlindex 2e96576f..c4bdca95 100644--- a/core/Cargo.toml+++ b/core/Cargo.toml@@ -1,5 +1,5 @@[package]-authors = ['Stract ApS. <[email protected]>']+authors = ['Stract ApS. <[email protected]>']default-run = "stract"edition = "2021"license = "AGPL-3.0-or-later"diff --git a/core/src/entrypoint/configure.rs b/core/src/entrypoint/configure.rsindex 15860eeb..9f5f95f7 100644--- a/core/src/entrypoint/configure.rs+++ b/core/src/entrypoint/configure.rs@@ -54,7 +54,7 @@ fn download_files() {}info!("Downloading {}", name);- let body = reqwest::get(format!("http://s3.trystract.com/{BUCKET_NAME}/{name}"))+ let body = reqwest::get(format!("http://s3.stract.com/{BUCKET_NAME}/{name}")).await.unwrap();@@ -265,11 +265,9 @@ pub fn alice() -> Result<()> {.block_on(async {for name in ["model.safetensors", "tokenizer.json"] {info!("Downloading {}", name);- let body = reqwest::get(format!(- "http://s3.trystract.com/{BUCKET_NAME}/alice/{name}"- ))- .await- .unwrap();+ let body = reqwest::get(format!("http://s3.stract.com/{BUCKET_NAME}/alice/{name}"))+ .await+ .unwrap();let mut file = File::create(Path::new(DATA_PATH).join("alice").join(name)).awaitdiff --git a/core/src/lib.rs b/core/src/lib.rsindex adc62940..38508ef6 100644--- a/core/src/lib.rs+++ b/core/src/lib.rs@@ -16,7 +16,7 @@//! Main library for Stract.-#![doc(html_logo_url = "https://trystract.com/images/biglogo.svg")]+#![doc(html_logo_url = "https://stract.com/images/biglogo.svg")]// #![warn(clippy::pedantic)]// #![warn(missing_docs)]// #![warn(clippy::missing_docs_in_private_items)]diff --git a/core/testcases/schema_org/stackoverflow_inline.html b/core/testcases/schema_org/stackoverflow_inline.htmlindex d61956a6..61c890a5 100644--- a/core/testcases/schema_org/stackoverflow_inline.html+++ b/core/testcases/schema_org/stackoverflow_inline.html@@ -1711,7 +1711,7 @@ function makeCallback(therow) {<form id="post-form" action="/questions/7015668/answer/submit" method="post" class="js-add-answer-component post-form"><input type="hidden" id="post-id" value="7015668" /><input type="hidden" id="qualityBanWarningShown" name="qualityBanWarningShown" value="false" />- <input type="hidden" name="referrer" value="https://trystract.com/" />+ <input type="hidden" name="referrer" value="https://stract.com/" /><h2 class="space" id="your-answer-header">Your Answer</h2>diff --git a/docs/mkdocs.yml b/docs/mkdocs.ymlindex 488c46b7..e6edcf19 100644--- a/docs/mkdocs.yml+++ b/docs/mkdocs.yml@@ -31,6 +31,6 @@ extra_css:extra:expand: truegenerator: false- homepage: https://trystract.com+ homepage: https://stract.complugins:- searchdiff --git a/docs/src/crawler.md b/docs/src/crawler.mdindex 28ce3ead..a9134b1b 100644--- a/docs/src/crawler.md+++ b/docs/src/crawler.md@@ -24,4 +24,4 @@ When a domain has been sampled it is therefore marked as `CrawlInProgress` untilThe worker is quite simple and is responsible for fetching data from urls scheduled by the coordinator. It is completely stateless and stores the fetched data directly to an S3 bucket while sending newly discovered urls back to the coordinator.When a worker is tasked to crawl a new site, it first checks the `robots.txt` file for the site to see which urls (if any) it is allowed to crawl.-If the worker receives a `429 Too Many Requests` response from the site, it backs off for a while before trying again. The specific backoff time depends on how fast the server responds. Further details can be found [here](https://trystract.com/webmasters).\ No newline at end of file+If the worker receives a `429 Too Many Requests` response from the site, it backs off for a while before trying again. The specific backoff time depends on how fast the server responds. Further details can be found [here](https://stract.com/webmasters).\ No newline at end of filediff --git a/frontend/src/routes/webmasters/README.md b/frontend/src/routes/webmasters/README.mdindex 9ffd8a17..b182b216 100644--- a/frontend/src/routes/webmasters/README.md+++ b/frontend/src/routes/webmasters/README.md@@ -2,7 +2,7 @@Stract is an [open source](https://github.com/StractOrg/stract/) web search engine. StractBot is the name of our crawler that collects pages from the web in order to build the index.It is written in Rust and the source code can be found [here](https://github.com/StractOrg/stract/tree/main/core/src/crawler).-The crawler uses the user agent `Mozilla/5.0 (compatible; StractBot/0.1; open source search engine; +https://trystract.com/webmasters)`.+The crawler uses the user agent `Mozilla/5.0 (compatible; StractBot/0.1; open source search engine; +https://stract.com/webmasters)`.## Politeness@@ -15,4 +15,4 @@ The robots.txt file is cached for 1 hour, so changes to the file should be respe## Contact us-If you have any concerns or bad experiences with our crawler, please don't hesitate to reach out to us at [[email protected]](mailto:[email protected]). Chances are that others experience the same problems and we would love to fix them.+If you have any concerns or bad experiences with our crawler, please don't hesitate to reach out to us at [[email protected]](mailto:[email protected]). Chances are that others experience the same problems and we would love to fix them.diff --git a/frontend/static/opensearch.xml b/frontend/static/opensearch.xmlindex bbe1d723..67656e80 100644--- a/frontend/static/opensearch.xml+++ b/frontend/static/opensearch.xml@@ -2,8 +2,8 @@<ShortName>Stract</ShortName><Description>Open source search engine.</Description><InputEncoding>UTF-8</InputEncoding>- <Image width="32" height="32" type="image/x-icon">https://trystract.com/favicon.ico</Image>- <Url rel="results" type="text/html" template="https://trystract.com/search?q={searchTerms}"/>- <Url rel="suggestions" type="application/x-suggestions+json" template="https://trystract.com/beta/api/autosuggest/browser?q={searchTerms}"/>- <moz:SearchForm>https://trystract.com/</moz:SearchForm>+ <Image width="32" height="32" type="image/x-icon">https://stract.com/favicon.ico</Image>+ <Url rel="results" type="text/html" template="https://stract.com/search?q={searchTerms}"/>+ <Url rel="suggestions" type="application/x-suggestions+json" template="https://stract.com/beta/api/autosuggest/browser?q={searchTerms}"/>+ <moz:SearchForm>https://stract.com/</moz:SearchForm></OpenSearchDescription>diff --git a/frontend/svelte.config.js b/frontend/svelte.config.jsindex 8b1b0a03..fbf88e79 100644--- a/frontend/svelte.config.js+++ b/frontend/svelte.config.js@@ -32,7 +32,7 @@ const config = {// NOTE: Disabled in order to fetch optic sources client-side// 'connect-src': ["'self'", 'http://localhost:3000/'],'connect-src': ['*'],- 'img-src': ["'self'", 'data:', 'trystract.com', '0.0.0.0:3000'],+ 'img-src': ["'self'", 'data:', 'stract.com', '0.0.0.0:3000'],'style-src': ["'self'", "'unsafe-inline'"],},},diff --git a/ltr/auto_annotate.py b/ltr/auto_annotate.pyindex 0f06e0ad..c8a0132a 100644--- a/ltr/auto_annotate.py+++ b/ltr/auto_annotate.py@@ -114,7 +114,7 @@ def simplify_snippet(snippet):def get_search_results(query):- url = "https://trystract.com/beta/api/search"+ url = "https://stract.com/beta/api/search"payload = {"query": query,diff --git a/optics-lsp/README.md b/optics-lsp/README.mdindex f83514df..2178b222 100644--- a/optics-lsp/README.md+++ b/optics-lsp/README.md@@ -1,5 +1,5 @@# Optics VS Code Extension-This extension makes it easier to edit `.optic` files. An optic is used by [Stract](https://trystract.com) and gives you complete control over which search results gets returned and how they are ranked. This extension includes syntax highlighting for the optics language and an LSP to detect syntax errors.+This extension makes it easier to edit `.optic` files. An optic is used by [Stract](https://stract.com) and gives you complete control over which search results gets returned and how they are ranked. This extension includes syntax highlighting for the optics language and an LSP to detect syntax errors.## Sample `.optic` syntaxThis small sample hopefully gives you a quick introduction to the optics language.diff --git a/optics/testcases/samples b/optics/testcases/samplesindex ef0eba30..4a427478 160000--- a/optics/testcases/samples+++ b/optics/testcases/samples@@ -1 +1 @@-Subproject commit ef0eba30c920012471bb1180a4acfc5824ae40bd+Subproject commit 4a4274789d556a7b611274a11aaddf50e54d2500diff --git a/scripts/export_abstractive_summary_model b/scripts/export_abstractive_summary_modelindex 6855a1c2..4d9ac05b 100755--- a/scripts/export_abstractive_summary_model+++ b/scripts/export_abstractive_summary_model@@ -75,6 +75,6 @@ traced_decoder.save("data/summarizer/abstractive/traced_decoder.pt")traced_encoder.save("data/summarizer/abstractive/traced_encoder.pt")urllib.request.urlretrieve(- "http://s3.trystract.com/public/truncated_word2vec.bin.gz",+ "http://s3.stract.com/public/truncated_word2vec.bin.gz","data/summarizer/word2vec.bin.gz",)diff --git a/scripts/generate_nsfw_dataset.py b/scripts/generate_nsfw_dataset.pyindex 580a3fb8..604b3e5d 100755--- a/scripts/generate_nsfw_dataset.py+++ b/scripts/generate_nsfw_dataset.py@@ -57,7 +57,7 @@ queries = set()-## exported from https://trystract.com/explore+## exported from https://stract.com/explorensfw_optic = """DiscardNonMatching;Rule {Matches {@@ -5068,7 +5068,7 @@ Like(Site("redtube.com"));def search(json):json["numResults"] = 50r = requests.post(- "https://trystract.com/beta/api/search",+ "https://stract.com/beta/api/search",json=json,).json()diff --git a/tools/ranking-annotation/src/routes/annotate/[slug]/+page.server.ts b/tools/ranking-annotation/src/routes/annotate/[slug]/+page.server.tsindex 4654e3a1..705d7bbe 100644--- a/tools/ranking-annotation/src/routes/annotate/[slug]/+page.server.ts+++ b/tools/ranking-annotation/src/routes/annotate/[slug]/+page.server.ts@@ -4,7 +4,7 @@ import { asSimpleWebpage } from "$lib/webpage";import { redirect } from "@sveltejs/kit";const search = async (query: string) => {- return await fetch(`https://trystract.com/beta/api/search`, {+ return await fetch(`https://stract.com/beta/api/search`, {method: "POST",headers: {"Content-Type": "application/json",