这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 39 additions & 177 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ WORKDIR /repo
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
# For protobuf
golang-go \
build-essential \
cmake \
jq \
pkg-config \
libssl-dev \
golang-go \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& cargo install cargo-show

COPY . ./
RUN make build
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clean:
format:
cargo fmt

build: format
build:
mkdir -p $(BIN_DIR)
cargo build --release
cp -p ./target/release/bayard $(BIN_DIR)
Expand All @@ -27,7 +27,7 @@ tag:
git tag v$(VERSION)
git push origin v$(VERSION)

publish: format
publish:
ifeq ($(shell cargo show --json bayard-server | jq -r '.versions[].num' | grep $(SERVER_VERSION)),)
(cd bayard-server && cargo package && cargo publish)
sleep 10
Expand All @@ -53,7 +53,15 @@ docker-push:
docker push bayardsearch/bayard:$(VERSION)

docker-clean:
docker rmi -f $(shell docker images --filter "dangling=true" -q --no-trunc)
ifneq ($(shell docker ps -f 'status=exited' -q),)
docker rm $(shell docker ps -f 'status=exited' -q)
endif
ifneq ($(shell docker images -f 'dangling=true' -q),)
docker rmi -f $(shell docker images -f 'dangling=true' -q)
endif
ifneq ($(docker volume ls -f 'dangling=true' -q),)
docker volume rm $(docker volume ls -f 'dangling=true' -q)
endif

.PHONY: docs
docs:
Expand Down
6 changes: 3 additions & 3 deletions bayard-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bayard-client"
version = "0.7.1"
version = "0.7.2"
authors = ["Minoru Osuka <minoru.osuka@gmail.com>"]
edition = "2018"
description = "Client library for Bayard."
Expand All @@ -21,5 +21,5 @@ raft = "0.4.3"
rand = "0.7.3"
serde_json = "1.0.51"

bayard-proto = "0.7.0"
bayard-server = { version = "0.7.1", path = "../bayard-server" }
bayard-proto = "0.7.4"
bayard-server = { version = "0.7.2", path = "../bayard-server" }
4 changes: 2 additions & 2 deletions bayard-rest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bayard-rest"
version = "0.7.1"
version = "0.7.2"
authors = ["Minoru Osuka <minoru.osuka@gmail.com>"]
edition = "2018"
description = "REST API server for Bayard."
Expand All @@ -27,4 +27,4 @@ router = "0.6.0"
serde_json = "1.0.51"
urlencoded = "0.6.0"

bayard-client = { version = "0.7.0", path = "../bayard-client" }
bayard-client = { version = "0.7.2", path = "../bayard-client" }
7 changes: 3 additions & 4 deletions bayard-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bayard-server"
version = "0.7.1"
version = "0.7.2"
authors = ["MinoruOsuka <minoru.osuka@gmail.com>"]
edition = "2018"
description = "Bayard is a distributed search server."
Expand All @@ -20,15 +20,14 @@ futures = "0.1.29"
grpcio = { version = "0.4.7", features = [ "secure" ] }
jieba-rs = "0.4.10"
lazy_static = "1.4.0"
lindera-tantivy = "0.1.0"
lindera-tantivy = "0.1.1"
log = "0.4.8"
prometheus = "0.8.0"
protobuf = "2.14.0"
raft = "0.4.3"
rocksdb = "0.14.0"
serde = { version = "1.0.106", features = ["derive"] }
serde_json = "1.0.51"
stringreader = "0.1.1"
tantivy = "0.12.0"

bayard-proto = "0.7.0"
bayard-proto = "0.7.4"
8 changes: 4 additions & 4 deletions bayard/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bayard"
version = "0.7.1"
version = "0.7.2"
authors = ["Minoru Osuka <minoru.osuka@gmail.com>"]
edition = "2018"
description = "Bayard is a distributed search server."
Expand Down Expand Up @@ -28,6 +28,6 @@ num_cpus = "1.13.0"
raft = "0.4.3"
serde_json = "1.0.51"

bayard-client = { version = "0.7.1", path = "../bayard-client" }
bayard-proto = "0.7.0"
bayard-server = { version = "0.7.1", path = "../bayard-server" }
bayard-client = { version = "0.7.2", path = "../bayard-client" }
bayard-proto = "0.7.4"
bayard-server = { version = "0.7.2", path = "../bayard-server" }
6 changes: 1 addition & 5 deletions bayard/src/cli/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::collections::HashMap;
use std::path::Path;
use std::sync::Arc;

use bayard_proto::proto::{indexpb_grpc, raftpb_grpc};
use clap::ArgMatches;
use crossbeam_channel::select;
use futures::Future;
Expand All @@ -10,13 +11,11 @@ use log::*;
use raft::storage::MemStorage;

use bayard_client::raft::client::RaftClient;
use bayard_proto::proto::{indexpb_grpc, raftpb_grpc};
use bayard_server::index::server::IndexServer;
use bayard_server::raft::config::NodeAddress;

use crate::log::set_logger;
use crate::signal::sigterm_channel;
// use bayard_server::metrics::Metrics;

pub fn run_start_cli(matches: &ArgMatches) -> Result<(), std::io::Error> {
set_logger();
Expand Down Expand Up @@ -80,8 +79,6 @@ pub fn run_start_cli(matches: &ArgMatches) -> Result<(), std::io::Error> {
.to_string();
let raft_storage = MemStorage::new();

// let metrics = Metrics::new(id);

let (index, raft) = IndexServer::new(
index_path,
schema_file,
Expand All @@ -92,7 +89,6 @@ pub fn run_start_cli(matches: &ArgMatches) -> Result<(), std::io::Error> {
id,
node_address,
addresses,
// metrics,
);

let index_service = indexpb_grpc::create_index_service(index);
Expand Down
2 changes: 1 addition & 1 deletion docs/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ <h2><a class="header" href="#running-docker-container" id="running-docker-contai
<p>You can run the Docker container image with the following command:</p>
<pre><code class="language-text">$ docker run --rm --name bayard \
-p 5000:5000 -p 7000:7000\
bayardsearch/bayard:latest start
bayardsearch/bayard:latest start 1
</code></pre>
<h1><a class="header" href="#reference" id="reference">Reference</a></h1>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/running_on_docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h2><a class="header" href="#running-docker-container" id="running-docker-contai
<p>You can run the Docker container image with the following command:</p>
<pre><code class="language-text">$ docker run --rm --name bayard \
-p 5000:5000 -p 7000:7000\
bayardsearch/bayard:latest start
bayardsearch/bayard:latest start 1
</code></pre>

</main>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/searchindex.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs_src/running_on_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ You can run the Docker container image with the following command:
```text
$ docker run --rm --name bayard \
-p 5000:5000 -p 7000:7000\
bayardsearch/bayard:latest start
bayardsearch/bayard:latest start 1
```