Skip to content

Commit

Permalink
✨ Ranking of aggregated search results based on relevancy of the sear…
Browse files Browse the repository at this point in the history
…ch result to the user's search query (#549)

* add sorting by relevance and merge new changes

* fix conflicts

* Update src/models/aggregation_models.rs

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>

* Update src/models/aggregation_models.rs

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>

* Update Cargo.toml

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>

* Update Cargo.toml

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>

* Update Cargo.toml

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>

* enable non-static-synonyms features

---------

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
  • Loading branch information
spencerjibz and neon-mmd authored Mar 25, 2024
1 parent c584a7d commit bb50e8b
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 42 deletions.
79 changes: 79 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 89 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,93 @@ bench = false
path = "src/bin/websurfx.rs"

[dependencies]
reqwest = {version="0.11.24", default-features=false, features=["rustls-tls","brotli", "gzip"]}
tokio = {version="1.32.0",features=["rt-multi-thread","macros", "fs", "io-util"], default-features = false}
serde = {version="1.0.196", default-features=false, features=["derive"]}
serde_json = {version="1.0.109", default-features=false}
maud = {version="0.25.0", default-features=false, features=["actix-web"]}
scraper = {version="0.18.1", default-features = false}
actix-web = {version="4.4.0", features = ["cookies", "macros", "compress-brotli"], default-features=false}
actix-files = {version="0.6.5", default-features=false}
actix-cors = {version="0.7.0", default-features=false}
fake-useragent = {version="0.1.3", default-features=false}
env_logger = {version="0.11.1", default-features=false}
log = {version="0.4.21", default-features=false}
mlua = {version="0.9.1", features=["luajit", "vendored"], default-features=false}
redis = {version="0.24.0", features=["tokio-comp","connection-manager"], default-features = false, optional = true}
blake3 = {version="1.5.0", default-features=false}
error-stack = {version="0.4.0", default-features=false, features=["std"]}
async-trait = {version="0.1.76", default-features=false}
regex = {version="1.9.4", features=["perf"], default-features = false}
smallvec = {version="1.13.1", features=["union", "serde"], default-features=false}
futures = {version="0.3.30", default-features=false, features=["alloc"]}
dhat = {version="0.3.2", optional = true, default-features=false}
reqwest = { version = "0.11.24", default-features = false, features = [
"rustls-tls",
"brotli",
"gzip",
] }
tokio = { version = "1.32.0", features = [
"rt-multi-thread",
"macros",
"fs",
"io-util",
], default-features = false }
serde = { version = "1.0.196", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.109", default-features = false }
maud = { version = "0.25.0", default-features = false, features = [
"actix-web",
] }
scraper = { version = "0.18.1", default-features = false }
actix-web = { version = "4.4.0", features = [
"cookies",
"macros",
"compress-brotli",
], default-features = false }
actix-files = { version = "0.6.5", default-features = false }
actix-cors = { version = "0.7.0", default-features = false }
fake-useragent = { version = "0.1.3", default-features = false }
env_logger = { version = "0.11.1", default-features = false }
log = { version = "0.4.21", default-features = false }
mlua = { version = "0.9.1", features = [
"luajit",
"vendored",
], default-features = false }
redis = { version = "0.24.0", features = [
"tokio-comp",
"connection-manager",
], default-features = false, optional = true }
blake3 = { version = "1.5.0", default-features = false }
error-stack = { version = "0.4.0", default-features = false, features = [
"std",
] }
async-trait = { version = "0.1.76", default-features = false }
regex = { version = "1.9.4", features = ["perf"], default-features = false }
smallvec = { version = "1.13.1", features = [
"union",
"serde",
], default-features = false }
futures = { version = "0.3.30", default-features = false, features = ["alloc"] }
dhat = { version = "0.3.2", optional = true, default-features = false }
mimalloc = { version = "0.1.38", default-features = false }
async-once-cell = {version="0.5.3", default-features=false}
actix-governor = {version="0.5.0", default-features=false}
mini-moka = { version="0.10", optional = true, default-features=false, features=["sync"]}
async-compression = { version = "0.4.6", default-features = false, features=["brotli","tokio"], optional=true}
chacha20poly1305={version="0.10.1", default-features=false, features=["alloc","getrandom"], optional=true}
chacha20 = {version="0.9.1", default-features=false, optional=true}
base64 = {version="0.21.5", default-features=false, features=["std"], optional=true}
cfg-if = {version="1.0.0", default-features=false,optional=true}
async-once-cell = { version = "0.5.3", default-features = false }
actix-governor = { version = "0.5.0", default-features = false }
mini-moka = { version = "0.10", optional = true, default-features = false, features = [
"sync",
] }
async-compression = { version = "0.4.6", default-features = false, features = [
"brotli",
"tokio",
], optional = true }
chacha20poly1305 = { version = "0.10.1", default-features = false, features = [
"alloc",
"getrandom",
], optional = true }
chacha20 = { version = "0.9.1", default-features = false, optional = true }
base64 = { version = "0.21.5", default-features = false, features = [
"std",
], optional = true }
cfg-if = { version = "1.0.0", default-features = false, optional = true }
keyword_extraction = { version = "1.3.0", default-features = false, features = [
"tf_idf",


] }

stop-words = { version = "0.8.0", default-features = false, features = ["iso"] }
thesaurus = { version = "0.5.2", default-features = false, optional = true, features = [
"moby",
] }

[dev-dependencies]
rusty-hook = {version="^0.11.2", default-features=false}
criterion = {version="0.5.1", default-features=false}
tempfile = {version="3.10.1", default-features=false}
rusty-hook = { version = "^0.11.2", default-features = false }
criterion = { version = "0.5.1", default-features = false }
tempfile = { version = "3.10.1", default-features = false }

[build-dependencies]
lightningcss = {version="1.0.0-alpha.52", default-features=false, features=["grid"]}
minify-js = {version="0.6.0", default-features=false}
lightningcss = { version = "1.0.0-alpha.52", default-features = false, features = [
"grid",
] }
minify-js = { version = "0.6.0", default-features = false }

[profile.dev]
opt-level = 0
Expand Down Expand Up @@ -80,11 +128,13 @@ rpath = false
strip = "symbols"

[features]
use-synonyms-search = ["thesaurus/static"]
default = ["memory-cache"]
dhat-heap = ["dep:dhat"]
dhat-heap = ["dep:dhat"]
memory-cache = ["dep:mini-moka"]
redis-cache = ["dep:redis","dep:base64"]
compress-cache-results = ["dep:async-compression","dep:cfg-if"]
encrypt-cache-results = ["dep:chacha20poly1305","dep:chacha20"]
cec-cache-results = ["compress-cache-results","encrypt-cache-results"]
redis-cache = ["dep:redis", "dep:base64"]
compress-cache-results = ["dep:async-compression", "dep:cfg-if"]
encrypt-cache-results = ["dep:chacha20poly1305", "dep:chacha20"]
cec-cache-results = ["compress-cache-results", "encrypt-cache-results"]
experimental-io-uring = ["actix-web/experimental-io-uring"]
use-non-static-synonyms-search = ["thesaurus"]
Loading

0 comments on commit bb50e8b

Please sign in to comment.