Skip to content

web search done right

Show ranking signals (#201)

Mikkel Denker17fed5a75c82
diff --git a/Cargo.lock b/Cargo.lock
index 92e88ffe..2a9ef968 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -187,6 +187,15 @@ dependencies = [
"backtrace",
]
+[[package]]
+name = "arbitrary"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
+dependencies = [
+ "derive_arbitrary",
+]
+
[[package]]
name = "arc-swap"
version = "1.7.0"
@@ -295,7 +304,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3776743bb68d4ad02ba30ba8f64373f1be4e082fe47651767171ce75bb2f6cf5"
dependencies = [
"attohttpc",
- "dirs 4.0.0",
+ "dirs",
"log",
"quick-xml 0.26.0",
"rust-ini",
@@ -664,14 +673,14 @@ dependencies = [
"indicatif 0.16.2",
"log",
"rand",
- "reqwest",
+ "reqwest 0.11.24",
"serde",
"serde_json",
"sha2",
"tar",
"tempfile",
"thiserror",
- "zip",
+ "zip 0.6.6",
]
[[package]]
@@ -692,7 +701,7 @@ dependencies = [
"safetensors 0.4.2",
"thiserror",
"yoke",
- "zip",
+ "zip 0.6.6",
]
[[package]]
@@ -1253,6 +1262,17 @@ dependencies = [
"serde",
]
+[[package]]
+name = "derive_arbitrary"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
+]
+
[[package]]
name = "derive_builder"
version = "0.12.0"
@@ -1314,16 +1334,7 @@ version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
- "dirs-sys 0.3.7",
-]
-
-[[package]]
-name = "dirs"
-version = "5.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
-dependencies = [
- "dirs-sys 0.4.1",
+ "dirs-sys",
]
[[package]]
@@ -1348,26 +1359,25 @@ dependencies = [
]
[[package]]
-name = "dirs-sys"
-version = "0.4.1"
+name = "dirs-sys-next"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
- "option-ext",
"redox_users",
- "windows-sys 0.48.0",
+ "winapi",
]
[[package]]
-name = "dirs-sys-next"
-version = "0.1.2"
+name = "displaydoc"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
- "libc",
- "redox_users",
- "winapi",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
]
[[package]]
@@ -2224,6 +2234,24 @@ dependencies = [
"pin-project-lite",
"smallvec",
"tokio",
+ "want",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
+dependencies = [
+ "futures-util",
+ "http 1.1.0",
+ "hyper 1.2.0",
+ "hyper-util",
+ "rustls",
+ "rustls-pki-types",
+ "tokio",
+ "tokio-rustls",
+ "tower-service",
]
[[package]]
@@ -2246,6 +2274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"
dependencies = [
"bytes",
+ "futures-channel",
"futures-util",
"http 1.1.0",
"http-body 1.0.0",
@@ -2253,6 +2282,9 @@ dependencies = [
"pin-project-lite",
"socket2",
"tokio",
+ "tower",
+ "tower-service",
+ "tracing",
]
[[package]]
@@ -3188,12 +3220,6 @@ dependencies = [
"utoipa",
]
-[[package]]
-name = "option-ext"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
-
[[package]]
name = "ordered-multimap"
version = "0.4.3"
@@ -3914,7 +3940,7 @@ dependencies = [
"once_cell",
"percent-encoding",
"pin-project-lite",
- "rustls-pemfile",
+ "rustls-pemfile 1.0.4",
"serde",
"serde_json",
"serde_urlencoded",
@@ -3929,7 +3955,49 @@ dependencies = [
"wasm-bindgen-futures",
"wasm-streams",
"web-sys",
- "winreg",
+ "winreg 0.50.0",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10"
+dependencies = [
+ "base64 0.22.0",
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.0",
+ "http-body-util",
+ "hyper 1.2.0",
+ "hyper-rustls",
+ "hyper-util",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustls",
+ "rustls-pemfile 2.1.2",
+ "rustls-pki-types",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper",
+ "tokio",
+ "tokio-rustls",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "webpki-roots",
+ "winreg 0.52.0",
]
[[package]]
@@ -4025,7 +4093,6 @@ dependencies = [
"proc-macro2",
"quote",
"rust-embed-utils",
- "shellexpand",
"syn 2.0.52",
"walkdir",
]
@@ -4073,7 +4140,7 @@ dependencies = [
"minidom",
"percent-encoding",
"quick-xml 0.26.0",
- "reqwest",
+ "reqwest 0.11.24",
"serde",
"serde_derive",
"sha2",
@@ -4128,6 +4195,20 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "rustls"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
+dependencies = [
+ "log",
+ "ring",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
+]
+
[[package]]
name = "rustls-pemfile"
version = "1.0.4"
@@ -4137,6 +4218,33 @@ dependencies = [
"base64 0.21.7",
]
+[[package]]
+name = "rustls-pemfile"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
+dependencies = [
+ "base64 0.22.0",
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
+
+[[package]]
+name = "rustls-webpki"
+version = "0.102.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf"
+dependencies = [
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
[[package]]
name = "rustversion"
version = "1.0.14"
@@ -4473,15 +4581,6 @@ dependencies = [
"lazy_static",
]
-[[package]]
-name = "shellexpand"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b"
-dependencies = [
- "dirs 5.0.1",
-]
-
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
@@ -4688,7 +4787,7 @@ dependencies = [
"rayon",
"redb",
"regex",
- "reqwest",
+ "reqwest 0.11.24",
"ring",
"rio_api",
"rio_turtle",
@@ -5204,7 +5303,7 @@ dependencies = [
"cached-path",
"clap",
"derive_builder",
- "dirs 4.0.0",
+ "dirs",
"esaxx-rs",
"getrandom",
"indicatif 0.15.0",
@@ -5220,7 +5319,7 @@ dependencies = [
"rayon-cond",
"regex",
"regex-syntax 0.7.5",
- "reqwest",
+ "reqwest 0.11.24",
"serde",
"serde_json",
"spm_precompiled",
@@ -5270,6 +5369,17 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "tokio-rustls"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
+dependencies = [
+ "rustls",
+ "rustls-pki-types",
+ "tokio",
+]
+
[[package]]
name = "tokio-stream"
version = "0.1.14"
@@ -5642,9 +5752,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "utoipa"
-version = "4.2.0"
+version = "4.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "272ebdfbc99111033031d2f10e018836056e4d2c8e2acda76450ec7974269fa7"
+checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23"
dependencies = [
"indexmap 2.2.5",
"serde",
@@ -5654,9 +5764,9 @@ dependencies = [
[[package]]
name = "utoipa-gen"
-version = "4.2.0"
+version = "4.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3c9f4d08338c1bfa70dde39412a040a884c6f318b3d09aaaf3437a1e52027fc"
+checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be"
dependencies = [
"proc-macro-error",
"proc-macro2",
@@ -5667,18 +5777,19 @@ dependencies = [
[[package]]
name = "utoipa-swagger-ui"
-version = "5.0.0"
+version = "7.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f839caa8e09dddc3ff1c3112a91ef7da0601075ba5025d9f33ae99c4cb9b6e51"
+checksum = "6c49396bb19184d3ac1220bb56b3ec91e3d6275baa6cbd5a0f36f110a88d6afb"
dependencies = [
"axum",
"mime_guess",
"regex",
+ "reqwest 0.12.4",
"rust-embed",
"serde",
"serde_json",
"utoipa",
- "zip",
+ "zip 1.2.3",
]
[[package]]
@@ -5856,6 +5967,15 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "webpki-roots"
+version = "0.26.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009"
+dependencies = [
+ "rustls-pki-types",
+]
+
[[package]]
name = "weezl"
version = "0.1.8"
@@ -6082,6 +6202,16 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "winreg"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "wyz"
version = "0.5.1"
@@ -6182,6 +6312,12 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zeroize"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+
[[package]]
name = "zimba"
version = "0.1.0"
@@ -6212,6 +6348,21 @@ dependencies = [
"zstd 0.11.2+zstd.1.5.2",
]
+[[package]]
+name = "zip"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c700ea425e148de30c29c580c1f9508b93ca57ad31c9f4e96b83c194c37a7a8f"
+dependencies = [
+ "arbitrary",
+ "crc32fast",
+ "crossbeam-utils",
+ "displaydoc",
+ "flate2",
+ "indexmap 2.2.5",
+ "thiserror",
+]
+
[[package]]
name = "zstd"
version = "0.11.2+zstd.1.5.2"
diff --git a/Cargo.toml b/Cargo.toml
index 7534ef40..794b2b51 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -132,8 +132,8 @@ tracing-subscriber = {version = "0.3.11", features = ["env-filter"]}
tracing-test = "0.2.4"
url = {version = "2.4.0", features = ["serde"]}
urlencoding = "2.1.2"
-utoipa = {version = "4.0.0", features = ["axum_extras"]}
-utoipa-swagger-ui = {version = "5.0.0", features = ["axum"]}
+utoipa = {version = "4.2.3", features = ["axum_extras"]}
+utoipa-swagger-ui = {version = "7.0.0", features = ["axum"]}
uuid = "1.1.2"
whatlang = {version = "0.16.0", features = ["serde"]}
xxhash-rust = {version = "0.8.10", features = ["xxh3", "const_xxh3"]}
diff --git a/assets/licenses.html b/assets/licenses.html
index fc618c17..5bfb6a3c 100644
--- a/assets/licenses.html
+++ b/assets/licenses.html
@@ -44,13 +44,13 @@
<h2>Overview of licenses:</h2>
<ul class="licenses-overview">
- <li><a href="#Apache-2.0">Apache License 2.0</a> (393)</li>
- <li><a href="#MIT">MIT License</a> (192)</li>
+ <li><a href="#Apache-2.0">Apache License 2.0</a> (400)</li>
+ <li><a href="#MIT">MIT License</a> (194)</li>
<li><a href="#MPL-2.0">Mozilla Public License 2.0</a> (8)</li>
<li><a href="#BSD-3-Clause">BSD 3-Clause &quot;New&quot; or &quot;Revised&quot; License</a> (7)</li>
<li><a href="#Unicode-DFS-2016">Unicode License Agreement - Data Files and Software (2016)</a> (5)</li>
+ <li><a href="#ISC">ISC License</a> (4)</li>
<li><a href="#AGPL-3.0">GNU Affero General Public License v3.0</a> (3)</li>
- <li><a href="#ISC">ISC License</a> (3)</li>
<li><a href="#CC0-1.0">Creative Commons Zero v1.0 Universal</a> (2)</li>
<li><a href="#Zlib">zlib License</a> (2)</li>
<li><a href="#BSL-1.0">Boost Software License 1.0</a> (1)</li>
@@ -1537,6 +1537,7 @@ You should also get your employer (if you work as a programmer) or school, if an
<li><a href=" https://github.com/tormol/encode_unicode ">encode_unicode 0.3.6</a></li>
<li><a href=" https://github.com/hsivonen/encoding_rs ">encoding_rs 0.8.33</a></li>
<li><a href=" https://github.com/nvzqz/static-assertions-rs ">static_assertions 1.1.0</a></li>
+ <li><a href=" https://github.com/RustCrypto/utils/tree/master/zeroize ">zeroize 1.7.0</a></li>
</ul>
<pre class="license-text">
Apache License
@@ -2813,9 +2814,9 @@ You should also get your employer (if you work as a programmer) or school, if an
<h3 id="Apache-2.0">Apache License 2.0</h3>
<h4>Used by:</h4>
<ul class="license-used-by">
- <li><a href=" https://github.com/juhaku/utoipa ">utoipa-gen 4.2.0</a></li>
- <li><a href=" https://github.com/juhaku/utoipa ">utoipa-swagger-ui 5.0.0</a></li>
- <li><a href=" https://github.com/juhaku/utoipa ">utoipa 4.2.0</a></li>
+ <li><a href=" https://github.com/juhaku/utoipa ">utoipa-gen 4.3.0</a></li>
+ <li><a href=" https://github.com/juhaku/utoipa ">utoipa-swagger-ui 7.0.1</a></li>
+ <li><a href=" https://github.com/juhaku/utoipa ">utoipa 4.2.3</a></li>
</ul>
<pre class="license-text"> Apache License
Version 2.0, January 2004
@@ -4951,9 +4952,7 @@ limitations under the License.
<li><a href=" https://github.com/xdg-rs/dirs ">dirs-next 2.0.0</a></li>
<li><a href=" https://github.com/xdg-rs/dirs/tree/master/dirs-sys ">dirs-sys-next 0.1.2</a></li>
<li><a href=" https://github.com/dirs-dev/dirs-sys-rs ">dirs-sys 0.3.7</a></li>
- <li><a href=" https://github.com/dirs-dev/dirs-sys-rs ">dirs-sys 0.4.1</a></li>
<li><a href=" https://github.com/soc/dirs-rs ">dirs 4.0.0</a></li>
- <li><a href=" https://github.com/soc/dirs-rs ">dirs 5.0.1</a></li>
</ul>
<pre class="license-text"> Apache License
Version 2.0, January 2004
@@ -5773,6 +5772,7 @@ limitations under the License.</pre>
<h4>Used by:</h4>
<ul class="license-used-by">
<li><a href=" https://github.com/seanmonstar/reqwest ">reqwest 0.11.24</a></li>
+ <li><a href=" https://github.com/seanmonstar/reqwest ">reqwest 0.12.4</a></li>
</ul>
<pre class="license-text"> Apache License
Version 2.0, January 2004
@@ -6174,6 +6174,215 @@ APPENDIX: How to apply the Apache License to your work.
Copyright 2017 http-rs authors
+Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+</pre>
+ </li>
+ <li class="license">
+ <h3 id="Apache-2.0">Apache License 2.0</h3>
+ <h4>Used by:</h4>
+ <ul class="license-used-by">
+ <li><a href=" https://github.com/rustls/tokio-rustls ">tokio-rustls 0.25.0</a></li>
+ </ul>
+ <pre class="license-text"> Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ &quot;License&quot; shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ &quot;Licensor&quot; shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ &quot;Legal Entity&quot; shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ &quot;control&quot; means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ &quot;You&quot; (or &quot;Your&quot;) shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ &quot;Source&quot; form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ &quot;Object&quot; form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ &quot;Work&quot; shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ &quot;Derivative Works&quot; shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ &quot;Contribution&quot; shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, &quot;submitted&quot;
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as &quot;Not a Contribution.&quot;
+
+ &quot;Contributor&quot; shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a &quot;NOTICE&quot; text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an &quot;AS IS&quot; BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets &quot;[]&quot;
+ replaced with your own identifying information. (Don&#x27;t include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same &quot;printed page&quot; as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright 2017 quininer kel
+
Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -7226,6 +7435,215 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+</pre>
+ </li>
+ <li class="license">
+ <h3 id="Apache-2.0">Apache License 2.0</h3>
+ <h4>Used by:</h4>
+ <ul class="license-used-by">
+ <li><a href=" https://github.com/rustls/pki-types ">rustls-pki-types 1.7.0</a></li>
+ </ul>
+ <pre class="license-text"> Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ &quot;License&quot; shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ &quot;Licensor&quot; shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ &quot;Legal Entity&quot; shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ &quot;control&quot; means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ &quot;You&quot; (or &quot;Your&quot;) shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ &quot;Source&quot; form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ &quot;Object&quot; form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ &quot;Work&quot; shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ &quot;Derivative Works&quot; shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ &quot;Contribution&quot; shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, &quot;submitted&quot;
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as &quot;Not a Contribution.&quot;
+
+ &quot;Contributor&quot; shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a &quot;NOTICE&quot; text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an &quot;AS IS&quot; BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets &quot;[]&quot;
+ replaced with your own identifying information. (Don&#x27;t include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same &quot;printed page&quot; as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright 2023 Dirkjan Ochtman
+
+Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -7658,6 +8076,7 @@ limitations under the License.</pre>
<li><a href=" https://github.com/gimli-rs/addr2line ">addr2line 0.21.0</a></li>
<li><a href=" https://github.com/tkaitchuck/ahash ">ahash 0.7.8</a></li>
<li><a href=" https://github.com/tkaitchuck/ahash ">ahash 0.8.11</a></li>
+ <li><a href=" https://github.com/rust-fuzz/arbitrary/ ">arbitrary 1.3.2</a></li>
<li><a href=" https://github.com/vorner/arc-swap ">arc-swap 1.7.0</a></li>
<li><a href=" https://github.com/nikomatsakis/ascii-canvas ">ascii-canvas 3.0.0</a></li>
<li><a href=" https://github.com/smol-rs/async-channel ">async-channel 1.9.0</a></li>
@@ -7686,6 +8105,7 @@ limitations under the License.</pre>
<li><a href=" https://github.com/crossbeam-rs/crossbeam ">crossbeam-deque 0.8.5</a></li>
<li><a href=" https://github.com/crossbeam-rs/crossbeam ">crossbeam-epoch 0.9.18</a></li>
<li><a href=" https://github.com/crossbeam-rs/crossbeam ">crossbeam-utils 0.8.19</a></li>
+ <li><a href=" https://github.com/rust-fuzz/arbitrary ">derive_arbitrary 1.3.2</a></li>
<li><a href=" https://github.com/rayon-rs/either ">either 1.10.0</a></li>
<li><a href=" https://github.com/embassy-rs/embedded-io ">embedded-io 0.4.0</a></li>
<li><a href=" https://github.com/rust-lang/ena ">ena 0.14.2</a></li>
@@ -7711,6 +8131,7 @@ limitations under the License.</pre>
<li><a href=" https://github.com/hermit-os/hermit-rs ">hermit-abi 0.3.9</a></li>
<li><a href=" https://github.com/servo/html5ever ">html5ever 0.26.0</a></li>
<li><a href=" https://github.com/seanmonstar/httparse ">httparse 1.8.0</a></li>
+ <li><a href=" https://github.com/rustls/hyper-rustls ">hyper-rustls 0.26.0</a></li>
<li><a href=" https://github.com/hyperium/hyper-tls ">hyper-tls 0.5.0</a></li>
<li><a href=" https://github.com/servo/rust-url/ ">idna 0.3.0</a></li>
<li><a href=" https://github.com/servo/rust-url/ ">idna 0.5.0</a></li>
@@ -7769,13 +8190,14 @@ limitations under the License.</pre>
<li><a href=" https://github.com/Kimundi/rustc-version-rs ">rustc_version 0.4.0</a></li>
<li><a href=" https://github.com/bytecodealliance/rustix ">rustix 0.38.31</a></li>
<li><a href=" https://github.com/rustls/pemfile ">rustls-pemfile 1.0.4</a></li>
+ <li><a href=" https://github.com/rustls/pemfile ">rustls-pemfile 2.1.2</a></li>
+ <li><a href=" https://github.com/rustls/rustls ">rustls 0.22.4</a></li>
<li><a href=" https://github.com/altsysrq/rusty-fork ">rusty-fork 0.3.0</a></li>
<li><a href=" https://github.com/alexcrichton/scoped-tls ">scoped-tls 1.0.1</a></li>
<li><a href=" https://github.com/bluss/scopeguard ">scopeguard 1.2.0</a></li>
<li><a href=" https://github.com/kornelski/rust-security-framework ">security-framework-sys 2.9.1</a></li>
<li><a href=" https://github.com/kornelski/rust-security-framework ">security-framework 2.9.2</a></li>
<li><a href=" https://github.com/mitsuhiko/serde-plain ">serde_plain 1.0.2</a></li>
- <li><a href=" https://gitlab.com/ijackson/rust-shellexpand ">shellexpand 3.1.0</a></li>
<li><a href=" https://github.com/vorner/signal-hook ">signal-hook-registry 1.4.1</a></li>
<li><a href=" https://github.com/mitsuhiko/similar ">similar 2.4.0</a></li>
<li><a href=" https://github.com/servo/rust-smallvec ">smallvec 1.13.1</a></li>
@@ -9684,6 +10106,7 @@ limitations under the License.
<h3 id="Apache-2.0">Apache License 2.0</h3>
<h4>Used by:</h4>
<ul class="license-used-by">
+ <li><a href=" https://github.com/yaahc/displaydoc ">displaydoc 0.2.4</a></li>
<li><a href=" https://github.com/alexcrichton/jobserver-rs ">jobserver 0.1.28</a></li>
</ul>
<pre class="license-text"> Apache License
@@ -11400,6 +11823,36 @@ express Statement of Purpose.
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+</pre>
+ </li>
+ <li class="license">
+ <h3 id="ISC">ISC License</h3>
+ <h4>Used by:</h4>
+ <ul class="license-used-by">
+ <li><a href=" https://github.com/rustls/webpki ">rustls-webpki 0.102.3</a></li>
+ </ul>
+ <pre class="license-text">// Copyright 2022 Rafael Fernández López.
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHORS DISCLAIM ALL WARRANTIES
+// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+mod dns_name;
+pub(crate) use dns_name::{verify_dns_names, WildcardDnsNameRef};
+
+mod ip_address;
+pub(crate) use ip_address::verify_ip_address_names;
+
+mod verify;
+pub(super) use verify::{check_name_constraints, GeneralName, NameIterator};
</pre>
</li>
<li class="license">
@@ -11943,6 +12396,7 @@ THE SOFTWARE.
<h4>Used by:</h4>
<ul class="license-used-by">
<li><a href=" https://github.com/gentoo90/winreg-rs ">winreg 0.50.0</a></li>
+ <li><a href=" https://github.com/gentoo90/winreg-rs ">winreg 0.52.0</a></li>
</ul>
<pre class="license-text">Copyright (c) 2015 Igor Shaula
@@ -13683,6 +14137,7 @@ SOFTWARE.
<ul class="license-used-by">
<li><a href=" https://github.com/mvdnes/spin-rs.git ">spin 0.9.8</a></li>
<li><a href=" https://github.com/zip-rs/zip.git ">zip 0.6.6</a></li>
+ <li><a href=" https://github.com/zip-rs/zip2.git ">zip 1.2.3</a></li>
</ul>
<pre class="license-text">The MIT License (MIT)
@@ -15884,8 +16339,8 @@ Exhibit B - &quot;Incompatible With Secondary Licenses&quot; Notice
<h3 id="MPL-2.0">Mozilla Public License 2.0</h3>
<h4>Used by:</h4>
<ul class="license-used-by">
- <li><a href=" https://github.com/soc/option-ext.git ">option-ext 0.2.0</a></li>
<li><a href=" https://github.com/servo/servo ">selectors 0.25.0</a></li>
+ <li><a href=" https://github.com/rustls/webpki-roots ">webpki-roots 0.26.1</a></li>
</ul>
<pre class="license-text">Mozilla Public License Version 2.0
&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;
diff --git a/crates/core/src/api/docs.rs b/crates/core/src/api/docs.rs
index f2dc87d5..959e74a9 100644
--- a/crates/core/src/api/docs.rs
+++ b/crates/core/src/api/docs.rs
@@ -78,7 +78,9 @@ use utoipa_swagger_ui::SwaggerUi;
crate::widgets::thesaurus::PartOfSpeech,
crate::widgets::thesaurus::PartOfSpeechMeaning,
+ crate::ranking::signal::SignalEnumDiscriminants,
crate::ranking::signal::SignalScore,
+
crate::bangs::BangHit,
crate::bangs::Bang,
diff --git a/crates/core/src/entrypoint/webgraph.rs b/crates/core/src/entrypoint/webgraph.rs
index 45363d72..9645228b 100644
--- a/crates/core/src/entrypoint/webgraph.rs
+++ b/crates/core/src/entrypoint/webgraph.rs
@@ -240,11 +240,9 @@ impl Webgraph {
}
r.recv().unwrap();
- let mut host = worker.host_graph.finalize();
- host.optimize_read();
- let mut page = worker.page_graph.finalize();
- page.optimize_read();
+ let host = worker.host_graph.finalize();
+ let page = worker.page_graph.finalize();
s.send(()).unwrap();
(host, page)
diff --git a/crates/core/src/ranking/signal/prelude.rs b/crates/core/src/ranking/signal/prelude.rs
index 8e454219..64d13c4d 100644
--- a/crates/core/src/ranking/signal/prelude.rs
+++ b/crates/core/src/ranking/signal/prelude.rs
@@ -71,7 +71,10 @@ pub trait Signal:
serde::Deserialize,
bincode::Encode,
bincode::Decode,
- Hash
+ PartialOrd,
+ Ord,
+ Hash,
+ utoipa::ToSchema,
))]
#[strum_discriminants(serde(rename_all = "snake_case"))]
pub enum SignalEnum {
diff --git a/crates/core/src/webgraph/store.rs b/crates/core/src/webgraph/store.rs
index 8dee58d8..b1646ea3 100644
--- a/crates/core/src/webgraph/store.rs
+++ b/crates/core/src/webgraph/store.rs
@@ -395,6 +395,10 @@ mod tests {
let edges: Vec<_> = store.get_with_label(&NodeID::from(1_u64), &EdgeLimit::Unlimited);
assert_eq!(edges.len(), 0);
+
+ let edges = store.iter_without_label().collect::<Vec<_>>();
+
+ assert_eq!(edges.len(), 1);
}
#[test]
diff --git a/crates/optics-lsp/Cargo.lock b/crates/optics-lsp/Cargo.lock
index c7bb15ab..9454279b 100644
--- a/crates/optics-lsp/Cargo.lock
+++ b/crates/optics-lsp/Cargo.lock
@@ -831,9 +831,9 @@ dependencies = [
[[package]]
name = "utoipa"
-version = "4.0.0"
+version = "4.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b208a50ff438dcdc887ea3f2db59530bd2f4bc3d2c70630e4d7ee7a281a1d1b"
+checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23"
dependencies = [
"indexmap 2.0.0",
"serde",
@@ -843,9 +843,9 @@ dependencies = [
[[package]]
name = "utoipa-gen"
-version = "4.0.0"
+version = "4.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bd516d8879043e081537690bc96c8f17b5a4602c336aecb8f1de89d9d9c7e72"
+checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be"
dependencies = [
"proc-macro-error",
"proc-macro2",
diff --git a/frontend/src/lib/api/index.ts b/frontend/src/lib/api/index.ts
index ffedc5aa..e3ea142b 100644
--- a/frontend/src/lib/api/index.ts
+++ b/frontend/src/lib/api/index.ts
@@ -200,6 +200,7 @@ export type ApiSearchQuery = {
returnStructuredData?: boolean;
safeSearch?: boolean;
selectedRegion?: Region;
+ signalCoefficients?: {};
};
export type ApiSearchResult =
| (WebsitesResult & {
@@ -376,6 +377,89 @@ export type ScoredHost = {
export type SidebarQuery = {
query: string;
};
+export type SignalEnumDiscriminants =
+ | 'bm25_title'
+ | 'bm25_title_bigrams'
+ | 'bm25_title_trigrams'
+ | 'bm25_clean_body'
+ | 'bm25_clean_body_bigrams'
+ | 'bm25_clean_body_trigrams'
+ | 'bm25_stemmed_title'
+ | 'bm25_stemmed_clean_body'
+ | 'bm25_all_body'
+ | 'bm25_keywords'
+ | 'bm25_backlink_text'
+ | 'idf_sum_url'
+ | 'idf_sum_site'
+ | 'idf_sum_domain'
+ | 'idf_sum_site_no_tokenizer'
+ | 'idf_sum_domain_no_tokenizer'
+ | 'idf_sum_domain_name_no_tokenizer'
+ | 'idf_sum_domain_if_homepage'
+ | 'idf_sum_domain_name_if_homepage_no_tokenizer'
+ | 'idf_sum_domain_if_homepage_no_tokenizer'
+ | 'idf_sum_title_if_homepage'
+ | 'cross_encoder_snippet'
+ | 'cross_encoder_title'
+ | 'host_centrality'
+ | 'host_centrality_rank'
+ | 'page_centrality'
+ | 'page_centrality_rank'
+ | 'is_homepage'
+ | 'fetch_time_ms'
+ | 'update_timestamp'
+ | 'tracker_score'
+ | 'region'
+ | 'query_centrality'
+ | 'inbound_similarity'
+ | 'lambda_mart'
+ | 'url_digits'
+ | 'url_slashes'
+ | 'link_density'
+ | 'title_embedding_similarity'
+ | 'keyword_embedding_similarity';
+export const SIGNAL_ENUM_DISCRIMINANTS = [
+ 'bm25_title',
+ 'bm25_title_bigrams',
+ 'bm25_title_trigrams',
+ 'bm25_clean_body',
+ 'bm25_clean_body_bigrams',
+ 'bm25_clean_body_trigrams',
+ 'bm25_stemmed_title',
+ 'bm25_stemmed_clean_body',
+ 'bm25_all_body',
+ 'bm25_keywords',
+ 'bm25_backlink_text',
+ 'idf_sum_url',
+ 'idf_sum_site',
+ 'idf_sum_domain',
+ 'idf_sum_site_no_tokenizer',
+ 'idf_sum_domain_no_tokenizer',
+ 'idf_sum_domain_name_no_tokenizer',
+ 'idf_sum_domain_if_homepage',
+ 'idf_sum_domain_name_if_homepage_no_tokenizer',
+ 'idf_sum_domain_if_homepage_no_tokenizer',
+ 'idf_sum_title_if_homepage',
+ 'cross_encoder_snippet',
+ 'cross_encoder_title',
+ 'host_centrality',
+ 'host_centrality_rank',
+ 'page_centrality',
+ 'page_centrality_rank',
+ 'is_homepage',
+ 'fetch_time_ms',
+ 'update_timestamp',
+ 'tracker_score',
+ 'region',
+ 'query_centrality',
+ 'inbound_similarity',
+ 'lambda_mart',
+ 'url_digits',
+ 'url_slashes',
+ 'link_density',
+ 'title_embedding_similarity',
+ 'keyword_embedding_similarity',
+] satisfies SignalEnumDiscriminants[];
export type SignalScore = {
coefficient: number;
value: number;
diff --git a/frontend/src/lib/search.ts b/frontend/src/lib/search.ts
index 4519c0f2..5a3d574d 100644
--- a/frontend/src/lib/search.ts
+++ b/frontend/src/lib/search.ts
@@ -18,8 +18,9 @@ export type SearchParams = {
optic: string | undefined;
selectedRegion: Region | undefined;
safeSearch: boolean;
- compressedhost_rankings: string | null;
- host_rankings: RankedSites | undefined;
+ compressedHostRankings: string | null;
+ hostRankings: RankedSites | undefined;
+ showRankingSignals?: boolean;
};
export type SearchResults =
@@ -53,8 +54,8 @@ export const extractSearchParams = (searchParams: URLSearchParams | FormData): S
optic,
selectedRegion,
safeSearch,
- compressedhost_rankings,
- host_rankings,
+ compressedHostRankings: compressedhost_rankings,
+ hostRankings: host_rankings,
};
};
@@ -105,7 +106,8 @@ export const search = async (params: SearchParams, options: ApiOptions) => {
safeSearch: params.safeSearch,
optic: params.optic && (await fetchRemoteOptic({ opticUrl: params.optic, fetch })),
selectedRegion: params.selectedRegion,
- hostRankings: params.host_rankings,
+ hostRankings: params.hostRankings,
+ returnRankingSignals: params.showRankingSignals,
},
options,
);
@@ -139,7 +141,7 @@ export const search = async (params: SearchParams, options: ApiOptions) => {
numResults: 10,
safeSearch: params.safeSearch,
selectedRegion: params.selectedRegion,
- hostRankings: params.host_rankings,
+ hostRankings: params.hostRankings,
},
options,
)
diff --git a/frontend/src/lib/stores.ts b/frontend/src/lib/stores.ts
index 7246703c..a9534a30 100644
--- a/frontend/src/lib/stores.ts
+++ b/frontend/src/lib/stores.ts
@@ -79,6 +79,9 @@ export const resultsInNewTab = writableLocalStorage<boolean>(RESULTS_IN_NEW_TAB_
const USE_KEYBOARD_SHORTCUTS = 'useKeyboardShortcuts';
export const useKeyboardShortcuts = writableLocalStorage<boolean>(USE_KEYBOARD_SHORTCUTS, true);
+const SHOW_RANKINGS_SIGNALS = 'showRankingSignals';
+export const showRankingSignals = writableLocalStorage<boolean>(SHOW_RANKINGS_SIGNALS, false);
+
const MARK_PAGES_WITH_PAYWALL_KEY = 'markPagesWithPaywall';
export const markPagesWithPaywallStore = writableLocalStorage<boolean>(
MARK_PAGES_WITH_PAYWALL_KEY,
diff --git a/frontend/src/routes/search/+page.svelte b/frontend/src/routes/search/+page.svelte
index 6b5f438c..0cad86b9 100644
--- a/frontend/src/routes/search/+page.svelte
+++ b/frontend/src/routes/search/+page.svelte
@@ -3,7 +3,7 @@
import Searchbar from '$lib/components/Searchbar.svelte';
import type { PageData } from './$types';
import RegionSelect from '$lib/components/RegionSelect.svelte';
- import { searchQueryStore, useKeyboardShortcuts } from '$lib/stores';
+ import { searchQueryStore, showRankingSignals, useKeyboardShortcuts } from '$lib/stores';
import { page } from '$app/stores';
import { updateQueryId } from '$lib/improvements';
import { browser } from '$app/environment';
@@ -45,7 +45,12 @@
const clientSearch = async () => {
if (!browser) return;
- const res = await search(data.params, { fetch: fetch });
+ const params = {
+ ...data.params,
+ showRankingSignals: $showRankingSignals,
+ };
+
+ const res = await search(params, { fetch: fetch });
if (res._type == 'bang') {
window.location.replace(res.redirectTo);
diff --git a/frontend/src/routes/search/Modal.svelte b/frontend/src/routes/search/Modal.svelte
index 7c3c8033..a2c8eee1 100644
--- a/frontend/src/routes/search/Modal.svelte
+++ b/frontend/src/routes/search/Modal.svelte
@@ -1,24 +1,133 @@
+<script context="module" lang="ts">
+ export type SignalLabel =
+ | 'title'
+ | 'body'
+ | 'keywords'
+ | 'backlink_text'
+ | 'url'
+ | 'site'
+ | 'domain'
+ | 'hostCentrality'
+ | 'pageCentrality'
+ | 'isHomepage'
+ | 'fetchTime'
+ | 'updateTimestamp'
+ | 'trackerScore'
+ | 'region'
+ | 'queryCentrality'
+ | 'inboundSimilarity'
+ | 'urlSymbols'
+ | 'linkDensity';
+</script>
+
<script lang="ts">
import { Ranking } from '$lib/rankings';
import { hostRankingsStore, summarize } from '$lib/stores';
- import type { DisplayedWebpage } from '$lib/api';
+ import type { DisplayedWebpage, SignalEnumDiscriminants, SignalScore } from '$lib/api';
import { twJoin } from 'tailwind-merge';
import Button from '$lib/components/Button.svelte';
import HandThumbDown from '~icons/heroicons/hand-thumb-down-20-solid';
import HandThumbUp from '~icons/heroicons/hand-thumb-up-20-solid';
import NoSymbol from '~icons/heroicons/no-symbol-20-solid';
import { scale } from 'svelte/transition';
+ import { match } from 'ts-pattern';
+ import SignalInfo from './SignalInfo.svelte';
export let query: string;
export let modal: { top: number; left: number; site: DisplayedWebpage };
const mediumWidthCutoff = 768;
- const widthPixels = 208;
+ const hasSignals = Object.keys(modal.site.rankingSignals ?? {}).length;
+ const widthPixels = hasSignals > 0 ? 300 : 208;
let innerWidth = 0;
let left = modal.left;
+
+ const signalLabel = (signal: SignalEnumDiscriminants): SignalLabel | undefined => {
+ return match(signal)
+ .with('bm25_title', () => 'title' as const)
+ .with('bm25_title_bigrams', () => 'title' as const)
+ .with('bm25_title_trigrams', () => 'title' as const)
+ .with('bm25_clean_body', () => 'body' as const)
+ .with('bm25_clean_body_bigrams', () => 'body' as const)
+ .with('bm25_clean_body_trigrams', () => 'body' as const)
+ .with('bm25_stemmed_title', () => 'title' as const)
+ .with('bm25_stemmed_clean_body', () => 'body' as const)
+ .with('bm25_all_body', () => 'body' as const)
+ .with('bm25_keywords', () => 'keywords' as const)
+ .with('bm25_backlink_text', () => 'backlink_text' as const)
+ .with('idf_sum_url', () => 'url' as const)
+ .with('idf_sum_site', () => 'site' as const)
+ .with('idf_sum_domain', () => 'domain' as const)
+ .with('idf_sum_site_no_tokenizer', () => 'site' as const)
+ .with('idf_sum_domain_no_tokenizer', () => 'domain' as const)
+ .with('idf_sum_domain_name_no_tokenizer', () => 'domain' as const)
+ .with('idf_sum_domain_if_homepage', () => 'domain' as const)
+ .with('idf_sum_domain_name_if_homepage_no_tokenizer', () => 'domain' as const)
+ .with('idf_sum_domain_if_homepage_no_tokenizer', () => 'domain' as const)
+ .with('idf_sum_title_if_homepage', () => 'title' as const)
+ .with('cross_encoder_snippet', () => 'body' as const)
+ .with('cross_encoder_title', () => 'title' as const)
+ .with('host_centrality', () => 'hostCentrality' as const)
+ .with('host_centrality_rank', () => 'hostCentrality' as const)
+ .with('page_centrality', () => 'pageCentrality' as const)
+ .with('page_centrality_rank', () => 'pageCentrality' as const)
+ .with('is_homepage', () => 'isHomepage' as const)
+ .with('fetch_time_ms', () => 'fetchTime' as const)
+ .with('update_timestamp', () => 'updateTimestamp' as const)
+ .with('tracker_score', () => 'trackerScore' as const)
+ .with('region', () => 'region' as const)
+ .with('query_centrality', () => 'queryCentrality' as const)
+ .with('inbound_similarity', () => 'inboundSimilarity' as const)
+ .with('lambda_mart', () => undefined)
+ .with('url_digits', () => 'urlSymbols' as const)
+ .with('url_slashes', () => 'urlSymbols' as const)
+ .with('link_density', () => 'linkDensity' as const)
+ .with('title_embedding_similarity', () => 'title' as const)
+ .with('keyword_embedding_similarity', () => 'keywords' as const)
+ .exhaustive();
+ };
+
+ type SignalGroup = {
+ label: SignalLabel;
+ signals: [SignalEnumDiscriminants, SignalScore][];
+ };
+
+ const score = (group: SignalGroup): number => {
+ return group.signals.reduce((acc, [_, score]) => {
+ return acc + score.coefficient * score.value;
+ }, 0);
+ };
+
+ $: signalGroups = Object.entries(modal.site.rankingSignals ?? {}).reduce(
+ (acc, [untypedSignal, untypedScore]) => {
+ const signal = untypedSignal as SignalEnumDiscriminants;
+ const score = untypedScore as SignalScore;
+
+ const label = signalLabel(signal);
+ if (label) {
+ const group = acc.find((group) => group.label === label);
+ if (group) {
+ group.signals.push([signal, score]);
+ } else {
+ acc.push({ label, signals: [[signal, score]] });
+ }
+ }
+ return acc;
+ },
+ [] as SignalGroup[],
+ );
+
+ $: {
+ signalGroups.sort((a, b) => score(b) - score(a));
+
+ for (const group of signalGroups) {
+ group.signals.sort((a, b) => b[1].coefficient * b[1].value - a[1].coefficient * a[1].value);
+ }
+ }
+
$: top = modal.top + 32;
$: {
@@ -78,7 +187,9 @@
>
<div>
<h2 class="w-full text-center">Do you like results from</h2>
- <p class="text-center">{modal.site.site}?</p>
+ <p class="w-full break-all text-center">
+ {modal.site.site}?
+ </p>
<div class="flex justify-center space-x-1.5 pt-2">
{#each rankingChoices as { ranking, kind, Icon, title, aria_label }}
<Button
@@ -97,5 +208,13 @@
<div class="mt-4 flex justify-center">
<Button pale on:click={summarizeSite(modal.site)}>Summarize Result</Button>
</div>
+ {#if signalGroups.length > 0}
+ <h3 class="mt-4 font-medium">Ranking Explanation</h3>
+ <div class="flex flex-col gap-y-1">
+ {#each signalGroups.slice(0, 3) as { label, signals }}
+ <SignalInfo {label} {signals} />
+ {/each}
+ </div>
+ {/if}
</div>
</div>
diff --git a/frontend/src/routes/search/SignalInfo.svelte b/frontend/src/routes/search/SignalInfo.svelte
new file mode 100644
index 00000000..5c6484c0
--- /dev/null
+++ b/frontend/src/routes/search/SignalInfo.svelte
@@ -0,0 +1,112 @@
+<script lang="ts">
+ import ChevronDown from '~icons/heroicons/chevron-down';
+ import { match } from 'ts-pattern';
+ import type { SignalLabel } from './Modal.svelte';
+ import type { SignalEnumDiscriminants, SignalScore } from '$lib/api';
+
+ export let label: SignalLabel;
+ export let signals: [SignalEnumDiscriminants, SignalScore][];
+
+ type SignalInfo = {
+ title: string;
+ description: string;
+ };
+ const signalInfo = (label: SignalLabel): SignalInfo => {
+ return match(label)
+ .with('title', () => ({
+ title: 'Title',
+ description: 'The query seems to match the title of the webpage',
+ }))
+ .with('body', () => ({
+ title: 'Body',
+ description: 'The query seems to match the text body of the webpage',
+ }))
+ .with('keywords', () => ({
+ title: 'Keywords',
+ description: 'The page contains keywords that also appear in the query',
+ }))
+ .with('backlink_text', () => ({
+ title: 'Backlink Text',
+ description: 'Pages linking to this page contain the query in their anchor text',
+ }))
+ .with('url', () => ({ title: 'URL', description: 'Words from the query appear in the URL' }))
+ .with('site', () => ({
+ title: 'Site',
+ description: 'The query matches the site of the page',
+ }))
+ .with('domain', () => ({
+ title: 'Domain',
+ description: 'The query matches the domain of the page',
+ }))
+ .with('hostCentrality', () => ({
+ title: 'Host Centrality',
+ description: 'The host of the page has a high centrality score in the web graph',
+ }))
+ .with('pageCentrality', () => ({
+ title: 'Page Centrality',
+ description: 'The page has a high centrality score in the web graph',
+ }))
+ .with('isHomepage', () => ({
+ title: 'Is Homepage',
+ description: 'The page is the homepage of the site',
+ }))
+ .with('fetchTime', () => ({
+ title: 'Fetch Time',
+ description:
+ 'The page had a low fetch time, indicating you will get a good user experience on the page',
+ }))
+ .with('updateTimestamp', () => ({
+ title: 'Update Timestamp',
+ description: 'The page was recently updated',
+ }))
+ .with('trackerScore', () => ({
+ title: 'Tracker Score',
+ description: 'We found few/no trackers on the page',
+ }))
+ .with('region', () => ({
+ title: 'Language',
+ description:
+ 'The page seems to be written in a widely spoken language, or matches the language you have set during search (if any)',
+ }))
+ .with('queryCentrality', () => ({
+ title: 'Query Centrality',
+ description: 'Other pages in the result set links to this page',
+ }))
+ .with('inboundSimilarity', () => ({
+ title: 'Liked/Disliked',
+ description: 'Another page you have liked/disliked influences the ranking of this page',
+ }))
+ .with('urlSymbols', () => ({ title: '', description: '' }))
+ .with('linkDensity', () => ({
+ title: 'Link Density',
+ description: 'The page has a low number of links compared to the amount of text',
+ }))
+ .exhaustive();
+ };
+</script>
+
+<details class="group">
+ <summary class="flex cursor-pointer list-none space-x-1">
+ <span>
+ <ChevronDown class="w-3 text-sm transition group-open:rotate-180" />
+ </span>
+ <div>
+ {signalInfo(label).title}
+ </div>
+ </summary>
+ <p class="text-sm">{signalInfo(label).description}</p>
+ <div class="mb-2 mt-1 text-xs">
+ <div class="flex flex-wrap gap-x-1 gap-y-1">
+ {#each signals.slice(0, 3) as [signal, score]}
+ <span
+ class="rounded-full bg-base-200 px-2 text-center text-xs text-neutral-focus"
+ title="The '{signal.replace(/_/g, '-')}' signal has a score of {(
+ score.value * score.coefficient
+ ).toFixed(2)}"
+ >
+ {signal.replace(/_/g, '-')}
+ </span>
+ {/each}
+ </div>
+ </div>
+</details>
diff --git a/frontend/src/routes/settings/+page.svelte b/frontend/src/routes/settings/+page.svelte
index 738b7b16..669c3802 100644
--- a/frontend/src/routes/settings/+page.svelte
+++ b/frontend/src/routes/settings/+page.svelte
@@ -6,6 +6,7 @@
import MarkPagesWithPaywallSelect from './MarkPagesWithPaywallSelect.svelte';
import ResultsInNewTabs from './ResultsInNewTabs.svelte';
import UseKeyboardShortcuts from './UseKeyboardShortcuts.svelte';
+ import ShowRankingSignals from './ShowRankingSignals.svelte';
const settings = [
{
@@ -44,6 +45,11 @@
description: 'Enables the use of keyboard shortcuts on the site',
_type: 'use-keeb-shortcuts',
},
+ {
+ title: 'Show ranking explanations',
+ description: 'Show the top ranking signals for each search result in the modal window',
+ _type: 'show-ranking-signals',
+ },
] as const;
</script>
@@ -73,6 +79,8 @@
<ResultsInNewTabs />
{:else if setting._type == 'use-keeb-shortcuts'}
<UseKeyboardShortcuts />
+ {:else if setting._type == 'show-ranking-signals'}
+ <ShowRankingSignals />
{/if}
</div>
</div>
diff --git a/frontend/src/routes/settings/ShowRankingSignals.svelte b/frontend/src/routes/settings/ShowRankingSignals.svelte
new file mode 100644
index 00000000..08a624fc
--- /dev/null
+++ b/frontend/src/routes/settings/ShowRankingSignals.svelte
@@ -0,0 +1,6 @@
+<script lang="ts">
+ import { showRankingSignals } from '$lib/stores';
+ import RadioSelect from './RadioSelect.svelte';
+</script>
+
+<RadioSelect store={showRankingSignals} prefix="show-ranking-signals" />