mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Merge pull request #71 from meilisearch/cleanup-useless-build-rs
Cleanup useless custom build file
This commit is contained in:
commit
2fa5808e3f
27
build.rs
27
build.rs
@ -1,27 +0,0 @@
|
|||||||
use std::env;
|
|
||||||
use std::fs::File;
|
|
||||||
use std::io::{BufRead, BufReader};
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
use fst::SetBuilder;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
let chinese_words_txt = "chinese-words.txt";
|
|
||||||
let out_dir = env::var("OUT_DIR").unwrap();
|
|
||||||
let chinese_words_fst = PathBuf::from(out_dir).join("chinese-words.fst");
|
|
||||||
|
|
||||||
// Tell Cargo that if the given file changes, to rerun this build script.
|
|
||||||
println!("cargo:rerun-if-changed={}", chinese_words_txt);
|
|
||||||
|
|
||||||
let chinese_words_txt = File::open(chinese_words_txt).map(BufReader::new).unwrap();
|
|
||||||
let chinese_words_fst = File::create(chinese_words_fst).unwrap();
|
|
||||||
|
|
||||||
let mut builder = SetBuilder::new(chinese_words_fst).unwrap();
|
|
||||||
for result in chinese_words_txt.lines() {
|
|
||||||
let line = result.unwrap();
|
|
||||||
if let Some(s) = line.split(' ').next() {
|
|
||||||
builder.insert(s).unwrap();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
builder.finish().unwrap();
|
|
||||||
}
|
|
349046
chinese-words.txt
349046
chinese-words.txt
File diff suppressed because it is too large
Load Diff
2
http-ui/Cargo.lock
generated
2
http-ui/Cargo.lock
generated
@ -1041,7 +1041,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "meilisearch-tokenizer"
|
name = "meilisearch-tokenizer"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://github.com/meilisearch/Tokenizer.git?branch=token-eq#daeb4a4ac91081f1c592e3ebb3ec5d8dcb4e6976"
|
source = "git+https://github.com/meilisearch/Tokenizer.git?branch=main#147b6154b1b34cb8f5da2df6a416b7da191bc850"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"character_converter",
|
"character_converter",
|
||||||
"cow-utils",
|
"cow-utils",
|
||||||
|
@ -28,7 +28,6 @@ use tokio::sync::broadcast;
|
|||||||
use warp::filters::ws::Message;
|
use warp::filters::ws::Message;
|
||||||
use warp::{Filter, http::Response};
|
use warp::{Filter, http::Response};
|
||||||
use meilisearch_tokenizer::{Analyzer, AnalyzerConfig};
|
use meilisearch_tokenizer::{Analyzer, AnalyzerConfig};
|
||||||
use fst::Set;
|
|
||||||
|
|
||||||
use milli::update::UpdateIndexingStep::*;
|
use milli::update::UpdateIndexingStep::*;
|
||||||
use milli::update::{UpdateBuilder, IndexDocumentsMethod, UpdateFormat};
|
use milli::update::{UpdateBuilder, IndexDocumentsMethod, UpdateFormat};
|
||||||
|
Loading…
Reference in New Issue
Block a user