mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
Update MeiliSearch into Meilisearch everywhere
This commit is contained in:
parent
0a78750465
commit
8a959da120
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -23,7 +23,7 @@ A clear and concise description of what you expected to happen.
|
|||||||
**Screenshots**
|
**Screenshots**
|
||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
**MeiliSearch version:** [e.g. v0.20.0]
|
**Meilisearch version:** [e.g. v0.20.0]
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Additional information that may be relevant to the issue.
|
Additional information that may be relevant to the issue.
|
||||||
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -6,5 +6,5 @@ contact_links:
|
|||||||
url: https://github.com/meilisearch/documentation/issues/new
|
url: https://github.com/meilisearch/documentation/issues/new
|
||||||
about: For documentation issues, open an issue or a PR in the documentation repository
|
about: For documentation issues, open an issue or a PR in the documentation repository
|
||||||
- name: Support questions & other
|
- name: Support questions & other
|
||||||
url: https://github.com/meilisearch/MeiliSearch/discussions/new
|
url: https://github.com/meilisearch/meilisearch/discussions/new
|
||||||
about: For any other question, open a discussion in this repository
|
about: For any other question, open a discussion in this repository
|
||||||
|
2
.github/is-latest-release.sh
vendored
2
.github/is-latest-release.sh
vendored
@ -74,7 +74,7 @@ semverLT() {
|
|||||||
# Returns the tag of the latest stable release (in terms of semver and not of release date)
|
# Returns the tag of the latest stable release (in terms of semver and not of release date)
|
||||||
get_latest() {
|
get_latest() {
|
||||||
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
|
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
|
||||||
curl -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file"
|
curl -s 'https://api.github.com/repos/meilisearch/meiliSearch/releases' > "$temp_file"
|
||||||
releases=$(cat "$temp_file" | \
|
releases=$(cat "$temp_file" | \
|
||||||
grep -E "tag_name|draft|prerelease" \
|
grep -E "tag_name|draft|prerelease" \
|
||||||
| tr -d ',"' | cut -d ':' -f2 | tr -d ' ')
|
| tr -d ',"' | cut -d ':' -f2 | tr -d ' ')
|
||||||
|
2
.github/workflows/README.md
vendored
2
.github/workflows/README.md
vendored
@ -1,4 +1,4 @@
|
|||||||
# GitHub Actions Workflow for MeiliSearch
|
# GitHub Actions Workflow for Meilisearch
|
||||||
|
|
||||||
> **Note:**
|
> **Note:**
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# Security
|
# Security
|
||||||
|
|
||||||
MeiliSearch takes the security of our software products and services seriously.
|
Meilisearch takes the security of our software products and services seriously.
|
||||||
|
|
||||||
If you believe you have found a security vulnerability in any MeiliSearch-owned repository, please report it to us as described below.
|
If you believe you have found a security vulnerability in any Meilisearch-owned repository, please report it to us as described below.
|
||||||
|
|
||||||
## Suported versions
|
## Suported versions
|
||||||
|
|
||||||
As long as we are pre-v1.0, only the latest version of MeiliSearch will be supported with security updates.
|
As long as we are pre-v1.0, only the latest version of Meilisearch will be supported with security updates.
|
||||||
|
|
||||||
## Reporting security issues
|
## Reporting security issues
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ get_latest() {
|
|||||||
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
|
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
|
||||||
|
|
||||||
if [ -z "$GITHUB_PAT" ]; then
|
if [ -z "$GITHUB_PAT" ]; then
|
||||||
curl -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file" || return 1
|
curl -s 'https://api.github.com/repos/meilisearch/Meilisearch/releases' > "$temp_file" || return 1
|
||||||
else
|
else
|
||||||
curl -H "Authorization: token $GITHUB_PAT" -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file" || return 1
|
curl -H "Authorization: token $GITHUB_PAT" -s 'https://api.github.com/repos/meilisearch/Meilisearch/releases' > "$temp_file" || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
releases=$(cat "$temp_file" | \
|
releases=$(cat "$temp_file" | \
|
||||||
@ -161,7 +161,7 @@ get_archi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
success_usage() {
|
success_usage() {
|
||||||
printf "$GREEN%s\n$DEFAULT" "MeiliSearch $latest binary successfully downloaded as '$binary_name' file."
|
printf "$GREEN%s\n$DEFAULT" "Meilisearch $latest binary successfully downloaded as '$binary_name' file."
|
||||||
echo ''
|
echo ''
|
||||||
echo 'Run it:'
|
echo 'Run it:'
|
||||||
echo ' $ ./meilisearch'
|
echo ' $ ./meilisearch'
|
||||||
@ -170,7 +170,7 @@ success_usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
failure_usage() {
|
failure_usage() {
|
||||||
printf "$RED%s\n$DEFAULT" 'ERROR: MeiliSearch binary is not available for your OS distribution or your architecture yet.'
|
printf "$RED%s\n$DEFAULT" 'ERROR: Meilisearch binary is not available for your OS distribution or your architecture yet.'
|
||||||
echo ''
|
echo ''
|
||||||
echo 'However, you can easily compile the binary from the source files.'
|
echo 'However, you can easily compile the binary from the source files.'
|
||||||
echo 'Follow the steps at the page ("Source" tab): https://docs.meilisearch.com/learn/getting_started/installation.html'
|
echo 'Follow the steps at the page ("Source" tab): https://docs.meilisearch.com/learn/getting_started/installation.html'
|
||||||
@ -181,8 +181,8 @@ latest="$(get_latest)"
|
|||||||
|
|
||||||
if [ "$latest" = '' ]; then
|
if [ "$latest" = '' ]; then
|
||||||
echo ''
|
echo ''
|
||||||
echo 'Impossible to get the latest stable version of MeiliSearch.'
|
echo 'Impossible to get the latest stable version of Meilisearch.'
|
||||||
echo 'Please let us know about this issue: https://github.com/meilisearch/MeiliSearch/issues/new/choose'
|
echo 'Please let us know about this issue: https://github.com/meilisearch/Meilisearch/issues/new/choose'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ if ! get_archi; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading MeiliSearch binary $latest for $os, architecture $archi..."
|
echo "Downloading Meilisearch binary $latest for $os, architecture $archi..."
|
||||||
case "$os" in
|
case "$os" in
|
||||||
'windows')
|
'windows')
|
||||||
release_file="meilisearch-$os-$archi.exe"
|
release_file="meilisearch-$os-$archi.exe"
|
||||||
@ -208,7 +208,7 @@ case "$os" in
|
|||||||
binary_name='meilisearch'
|
binary_name='meilisearch'
|
||||||
|
|
||||||
esac
|
esac
|
||||||
link="https://github.com/meilisearch/MeiliSearch/releases/download/$latest/$release_file"
|
link="https://github.com/meilisearch/Meilisearch/releases/download/$latest/$release_file"
|
||||||
curl -OL "$link"
|
curl -OL "$link"
|
||||||
mv "$release_file" "$binary_name"
|
mv "$release_file" "$binary_name"
|
||||||
chmod 744 "$binary_name"
|
chmod 744 "$binary_name"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["Quentin de Quelen <quentin@dequelen.me>", "Clément Renault <clement@meilisearch.com>"]
|
authors = ["Quentin de Quelen <quentin@dequelen.me>", "Clément Renault <clement@meilisearch.com>"]
|
||||||
description = "MeiliSearch HTTP server"
|
description = "Meilisearch HTTP server"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "meilisearch-http"
|
name = "meilisearch-http"
|
||||||
|
@ -29,12 +29,12 @@ pub type SegmentAnalytics = segment_analytics::SegmentAnalytics;
|
|||||||
#[cfg(all(not(debug_assertions), feature = "analytics"))]
|
#[cfg(all(not(debug_assertions), feature = "analytics"))]
|
||||||
pub type SearchAggregator = segment_analytics::SearchAggregator;
|
pub type SearchAggregator = segment_analytics::SearchAggregator;
|
||||||
|
|
||||||
/// The MeiliSearch config dir:
|
/// The Meilisearch config dir:
|
||||||
/// `~/.config/MeiliSearch` on *NIX or *BSD.
|
/// `~/.config/Meilisearch` on *NIX or *BSD.
|
||||||
/// `~/Library/ApplicationSupport` on macOS.
|
/// `~/Library/ApplicationSupport` on macOS.
|
||||||
/// `%APPDATA` (= `C:\Users%USERNAME%\AppData\Roaming`) on windows.
|
/// `%APPDATA` (= `C:\Users%USERNAME%\AppData\Roaming`) on windows.
|
||||||
static MEILISEARCH_CONFIG_PATH: Lazy<Option<PathBuf>> =
|
static MEILISEARCH_CONFIG_PATH: Lazy<Option<PathBuf>> =
|
||||||
Lazy::new(|| AppDirs::new(Some("MeiliSearch"), false).map(|appdir| appdir.config_dir));
|
Lazy::new(|| AppDirs::new(Some("Meilisearch"), false).map(|appdir| appdir.config_dir));
|
||||||
|
|
||||||
fn config_user_id_path(db_path: &Path) -> Option<PathBuf> {
|
fn config_user_id_path(db_path: &Path) -> Option<PathBuf> {
|
||||||
db_path
|
db_path
|
||||||
@ -50,7 +50,7 @@ fn config_user_id_path(db_path: &Path) -> Option<PathBuf> {
|
|||||||
.map(|(filename, config_path)| config_path.join(filename.trim_start_matches('-')))
|
.map(|(filename, config_path)| config_path.join(filename.trim_start_matches('-')))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Look for the instance-uid in the `data.ms` or in `~/.config/MeiliSearch/path-to-db-instance-uid`
|
/// Look for the instance-uid in the `data.ms` or in `~/.config/Meilisearch/path-to-db-instance-uid`
|
||||||
fn find_user_id(db_path: &Path) -> Option<String> {
|
fn find_user_id(db_path: &Path) -> Option<String> {
|
||||||
fs::read_to_string(db_path.join("instance-uid"))
|
fs::read_to_string(db_path.join("instance-uid"))
|
||||||
.ok()
|
.ok()
|
||||||
|
@ -78,7 +78,7 @@ impl SegmentAnalytics {
|
|||||||
let user = User::UserId { user_id };
|
let user = User::UserId { user_id };
|
||||||
let mut batcher = AutoBatcher::new(client, Batcher::new(None), SEGMENT_API_KEY.to_string());
|
let mut batcher = AutoBatcher::new(client, Batcher::new(None), SEGMENT_API_KEY.to_string());
|
||||||
|
|
||||||
// If MeiliSearch is Launched for the first time:
|
// If Meilisearch is Launched for the first time:
|
||||||
// 1. Send an event Launched associated to the user `total_launch`.
|
// 1. Send an event Launched associated to the user `total_launch`.
|
||||||
// 2. Batch an event Launched with the real instance-id and send it in one hour.
|
// 2. Batch an event Launched with the real instance-id and send it in one hour.
|
||||||
if first_time_run {
|
if first_time_run {
|
||||||
|
@ -128,7 +128,7 @@ pub fn print_launch_resume(opt: &Opt, user: &str) {
|
|||||||
if !opt.no_analytics {
|
if !opt.no_analytics {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"
|
"
|
||||||
Thank you for using MeiliSearch!
|
Thank you for using Meilisearch!
|
||||||
|
|
||||||
We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://docs.meilisearch.com/learn/what_is_meilisearch/telemetry.html
|
We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://docs.meilisearch.com/learn/what_is_meilisearch/telemetry.html
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ Anonymous telemetry:\t\"Enabled\""
|
|||||||
eprintln!();
|
eprintln!();
|
||||||
|
|
||||||
if opt.master_key.is_some() {
|
if opt.master_key.is_some() {
|
||||||
eprintln!("A Master Key has been set. Requests to MeiliSearch won't be authorized unless you provide an authentication key.");
|
eprintln!("A Master Key has been set. Requests to Meilisearch won't be authorized unless you provide an authentication key.");
|
||||||
} else {
|
} else {
|
||||||
eprintln!("No master key found; The server will accept unidentified requests. \
|
eprintln!("No master key found; The server will accept unidentified requests. \
|
||||||
If you need some protection in development mode, please export a key: export MEILI_MASTER_KEY=xxx");
|
If you need some protection in development mode, please export a key: export MEILI_MASTER_KEY=xxx");
|
||||||
|
@ -117,11 +117,11 @@ impl IndexUpdateResponse {
|
|||||||
/// Always return a 200 with:
|
/// Always return a 200 with:
|
||||||
/// ```json
|
/// ```json
|
||||||
/// {
|
/// {
|
||||||
/// "status": "MeiliSearch is running"
|
/// "status": "Meilisearch is running"
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub async fn running() -> HttpResponse {
|
pub async fn running() -> HttpResponse {
|
||||||
HttpResponse::Ok().json(serde_json::json!({ "status": "MeiliSearch is running" }))
|
HttpResponse::Ok().json(serde_json::json!({ "status": "Meilisearch is running" }))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_stats(
|
async fn get_stats(
|
||||||
|
@ -877,7 +877,7 @@ mod test {
|
|||||||
assert_eq!(value["publication_year"], "<em>1937</em>");
|
assert_eq!(value["publication_year"], "<em>1937</em>");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://github.com/meilisearch/MeiliSearch/issues/1368
|
/// https://github.com/meilisearch/meilisearch/issues/1368
|
||||||
#[test]
|
#[test]
|
||||||
fn formatted_with_highlight_emoji() {
|
fn formatted_with_highlight_emoji() {
|
||||||
let stop_words = fst::Set::default();
|
let stop_words = fst::Set::default();
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
pub enum VersionFileError {
|
pub enum VersionFileError {
|
||||||
#[error(
|
#[error(
|
||||||
"MeilSearch (v{}) failed to infer the version of the database. Please consider using a dump to load your data.",
|
"Meilisearch (v{}) failed to infer the version of the database. Please consider using a dump to load your data.",
|
||||||
env!("CARGO_PKG_VERSION").to_string()
|
env!("CARGO_PKG_VERSION").to_string()
|
||||||
)]
|
)]
|
||||||
MissingVersionFile,
|
MissingVersionFile,
|
||||||
#[error("Version file is corrupted and thus MeiliSearch is unable to determine the version of the database.")]
|
#[error("Version file is corrupted and thus Meilisearch is unable to determine the version of the database.")]
|
||||||
MalformedVersionFile,
|
MalformedVersionFile,
|
||||||
#[error(
|
#[error(
|
||||||
"Expected MeiliSearch engine version: {major}.{minor}.{patch}, current engine version: {}. To update MeiliSearch use a dump.",
|
"Expected Meilisearch engine version: {major}.{minor}.{patch}, current engine version: {}. To update Meilisearch use a dump.",
|
||||||
env!("CARGO_PKG_VERSION").to_string()
|
env!("CARGO_PKG_VERSION").to_string()
|
||||||
)]
|
)]
|
||||||
VersionMismatch {
|
VersionMismatch {
|
||||||
|
@ -12,7 +12,7 @@ static VERSION_MAJOR: &str = env!("CARGO_PKG_VERSION_MAJOR");
|
|||||||
static VERSION_MINOR: &str = env!("CARGO_PKG_VERSION_MINOR");
|
static VERSION_MINOR: &str = env!("CARGO_PKG_VERSION_MINOR");
|
||||||
static VERSION_PATCH: &str = env!("CARGO_PKG_VERSION_PATCH");
|
static VERSION_PATCH: &str = env!("CARGO_PKG_VERSION_PATCH");
|
||||||
|
|
||||||
// Persists the version of the current MeiliSearch binary to a VERSION file
|
// Persists the version of the current Meilisearch binary to a VERSION file
|
||||||
pub fn create_version_file(db_path: &Path) -> anyhow::Result<()> {
|
pub fn create_version_file(db_path: &Path) -> anyhow::Result<()> {
|
||||||
let version_path = db_path.join(VERSION_FILE_NAME);
|
let version_path = db_path.join(VERSION_FILE_NAME);
|
||||||
fs::write(
|
fs::write(
|
||||||
@ -23,7 +23,7 @@ pub fn create_version_file(db_path: &Path) -> anyhow::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensures MeiliSearch version is compatible with the database, returns an error versions mismatch.
|
// Ensures Meilisearch version is compatible with the database, returns an error versions mismatch.
|
||||||
pub fn check_version_file(db_path: &Path) -> anyhow::Result<()> {
|
pub fn check_version_file(db_path: &Path) -> anyhow::Result<()> {
|
||||||
let version_path = db_path.join(VERSION_FILE_NAME);
|
let version_path = db_path.join(VERSION_FILE_NAME);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ pub enum TaskEvent {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A task represents an operation that MeiliSearch must do.
|
/// A task represents an operation that Meilisearch must do.
|
||||||
/// It's stored on disk and executed from the lowest to highest Task id.
|
/// It's stored on disk and executed from the lowest to highest Task id.
|
||||||
/// Everytime a new task is created it has a higher Task id than the previous one.
|
/// Everytime a new task is created it has a higher Task id than the previous one.
|
||||||
/// See also `Job`.
|
/// See also `Job`.
|
||||||
@ -91,7 +91,7 @@ impl Task {
|
|||||||
|
|
||||||
/// A job is like a volatile priority `Task`.
|
/// A job is like a volatile priority `Task`.
|
||||||
/// It should be processed as fast as possible and is not stored on disk.
|
/// It should be processed as fast as possible and is not stored on disk.
|
||||||
/// This means, when MeiliSearch is closed all your unprocessed jobs will disappear.
|
/// This means, when Meilisearch is closed all your unprocessed jobs will disappear.
|
||||||
#[derive(Debug, derivative::Derivative)]
|
#[derive(Debug, derivative::Derivative)]
|
||||||
#[derivative(PartialEq)]
|
#[derivative(PartialEq)]
|
||||||
pub enum Job {
|
pub enum Job {
|
||||||
|
@ -87,7 +87,7 @@ impl Store {
|
|||||||
/// This function should be called *right after* creating the store.
|
/// This function should be called *right after* creating the store.
|
||||||
/// It put back all unfinished update in the `Created` state. This
|
/// It put back all unfinished update in the `Created` state. This
|
||||||
/// allow us to re-enqueue an update that didn't had the time to finish
|
/// allow us to re-enqueue an update that didn't had the time to finish
|
||||||
/// when MeiliSearch closed.
|
/// when Meilisearch closed.
|
||||||
pub fn reset_and_return_unfinished_tasks(&mut self) -> Result<BinaryHeap<Pending<TaskId>>> {
|
pub fn reset_and_return_unfinished_tasks(&mut self) -> Result<BinaryHeap<Pending<TaskId>>> {
|
||||||
let mut unfinished_tasks: BinaryHeap<Pending<TaskId>> = BinaryHeap::new();
|
let mut unfinished_tasks: BinaryHeap<Pending<TaskId>> = BinaryHeap::new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user