meilisearch/http-ui/Cargo.toml
Samyak S Sarnayak 30247d70cd
Fix search highlight for non-unicode chars
The `matching_bytes` function takes a `&Token` now and:
- gets the number of bytes to highlight (unchanged).
- uses `Token.num_graphemes_from_bytes` to get the number of grapheme
  clusters to highlight.

In essence, the `matching_bytes` function returns the number of matching
grapheme clusters instead of bytes. Should this function be renamed
then?

Added proper highlighting in the HTTP UI:
- requires dependency on `unicode-segmentation` to extract grapheme
  clusters from tokens
- `<mark>` tag is put around only the matched part
    - before this change, the entire word was highlighted even if only a
      part of it matched
2022-01-17 11:37:44 +05:30

50 lines
1.3 KiB
TOML

[package]
name = "http-ui"
description = "The HTTP user interface of the milli search engine"
version = "0.21.0"
authors = ["Clément Renault <clement@meilisearch.com>"]
edition = "2018"
[dependencies]
anyhow = "1.0.38"
byte-unit = { version = "4.0.9", default-features = false, features = ["std"] }
crossbeam-channel = "0.5.0"
heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" }
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.6" }
memmap2 = "0.5.0"
milli = { path = "../milli" }
once_cell = "1.5.2"
rayon = "1.5.0"
structopt = { version = "0.3.21", default-features = false, features = ["wrap_help"] }
tempfile = "3.2.0"
unicode-segmentation = "1.6.0"
# http server
askama = "0.10.5"
askama_warp = "0.10.0"
bytes = "0.5.6"
either = "1.6.1"
flate2 = "1.0.20"
futures = "0.3.12"
serde = { version = "1.0.123", features = ["derive"] }
serde_json = { version = "1.0.62", features = ["preserve_order"] }
tokio = { version = "0.2.25", features = ["full"] }
warp = "0.2.5"
# logging
log = "0.4.14"
stderrlog = "0.5.1"
fst = "0.4.5"
# Temporary fix for bitvec, remove once fixed. (https://github.com/bitvecto-rs/bitvec/issues/105)
funty = "=1.1"
bimap = "0.6.1"
csv = "1.1.6"
[dev-dependencies]
maplit = "1.0.2"
serde_test = "1.0.125"
[target.'cfg(target_os = "linux")'.dependencies]
jemallocator = "0.3.2"