From d84113caebf5802d6e90372d049a6ffeb9d064cd Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Wed, 1 Jun 2022 20:05:21 -0500 Subject: [PATCH] Add changelog and update readme --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ README.md | 11 ++++++++++- js/lunr.ar.js | 2 -- src/lang/ar.rs | 2 +- 4 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e7b79ba --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [3.0.0] - 2022-06-01 +### Added + - Language support for Arabic ([#40](https://github.com/mattico/elasticlunr-rs/pull/40])). + - Add the `Language` trait to make it easier to implement languages outside the crate. + - Add `IndexBuilder::add_field_with_tokenizer` to specify the tokenizer for a field. + +### Changed + - Update to 2018 edition, and bump MSRV to 1.54.0. + - Change benchmarks to use Criterion. + - Remove dependency on lazy_static. + - Update dependencies. + - Use Unicode character classes for trimmer. + - `IndexBuilder` functions which add fields will now panic if the same field is added multiple times. + - Fix `IndexBuilder` not respecting field insertion order. + +### Removed + - Remove the `default` feature. You now need to opt-in to the `languages` feature. + - Remove the deprecated function `Pipeline::for_language`. + - Remove the `pipeline::tokenize*` functions, which are now implemented as part of the `Language` trait. + - Remove `Index::add_doc_with_tokenizer(s)`, replaced by `IndexBuilder::add_field_with_tokenizer`. + - Remove the `Language` enum. Use the `Language` trait implementations in the `lang` modules, and the free functions `lang::from_name`, `lang::from_code`, and `lang::languages`. + + +[Unreleased]: https://github.com/mattico/elasticlunr-rs/compare/v3.0.0...HEAD +[3.0.0]: https://github.com/mattico/elasticlunr-rs/compare/v2.3.14...v3.0.0 diff --git a/README.md b/README.md index 19f8e9a..bd7d534 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,12 @@ file.write_all(index.to_json_pretty().as_bytes()); 1.54.0 +## Languages + +This library includes optional support for non-English languages, see the features in `Cargo.toml`. Like in the JavaScript +version, the language support is designed to be compatible with the [lunr-languages plugins][lunr-languages]. Some +languages use a modified version, which is included in the `js` directory of the repository. + ## License This repository is offered under the terms of the @@ -45,5 +51,8 @@ used under license. See LICENSE-JS for details. Includes stop word lists ported from [stopwords-filter][swft] Copyright (C) 2012 David J. Brenes, used under license. See LICENSE-WORDS for details. +Bundled javascript code in the repository (not included in the cargo package) may have other licenses. + +[lunr-languages]: https://github.com/MihaiValentin/lunr-languages [eljs]: https://github.com/weixsong/elasticlunr.js -[swft]: https://github.com/brenes/stopwords-filter +[swft]: https://github.com/brenes/stopwords-filter \ No newline at end of file diff --git a/js/lunr.ar.js b/js/lunr.ar.js index 96ff05c..f6471ee 100644 --- a/js/lunr.ar.js +++ b/js/lunr.ar.js @@ -4,8 +4,6 @@ * Copyright 2018, Dalia Al-Shahrabi * http://www.mozilla.org/MPL/ */ -/*! - */ /** * export the module via AMD, CommonJS or as a browser global diff --git a/src/lang/ar.rs b/src/lang/ar.rs index a33e9ee..d0a640e 100644 --- a/src/lang/ar.rs +++ b/src/lang/ar.rs @@ -4,7 +4,7 @@ use regex::Regex; /// Arabic Language /// -/// Designed for the included Javascript implementation. See `js/lunr.ar.js`. +/// Designed to be compatibile with the included Javascript implementation. See `js/lunr.ar.js`. pub struct Arabic {} impl Arabic {