caio.co/de/cantine

Prepare for v0.4.0 release

Id
a0031d3296b7b1a1a7e839d60d98469cbae9d4aa
Author
Caio
Commit time
2020-03-17T13:17:13+01:00

Modified tique/CHANGELOG.markdown

@@ -1,12 +1,15
-# v0.3.0 - 2020-02-19
+# Changelog
+
+## v0.4.0 - 2020-03-17
+
+* Stabilized `QueryParser` under the `queryparser` feature
+* Added `DisMaxQuery` and `QueryParser::parse_dismax`
+
+## v0.3.0 - 2020-02-19

* Depend on tantivy 0.12+
+* Added `topterms::Keywords`

-## topterms::Keywords
-
-* Generate weighted keyword queries with `into_boosted_query()`
-* Iterate over the Keywords' Terms, ordered by relevance, via `terms()`
-
-# v0.2.0 - 2020-02-16
+## v0.2.0 - 2020-02-16

* Added new `topterms` module

Modified tique/Cargo.toml

@@ -1,16 +1,19
[package]
name = "tique"
-version = "0.3.0"
+version = "0.4.0"

license = "MIT"
description = "Utilities to drive a tantivy search index"
-keywords = ["tantivy", "pagination", "aggregation", "collector", "similarity"]
+keywords = ["search", "pagination", "dismax", "collector", "similarity"]

repository = "https://github.com/caio/cantine/"
homepage = "https://github.com/caio/cantine/tree/master/tique"
authors = ["Caio Romão <contact@caio.co>"]
readme = "README.markdown"
edition = "2018"
+
+[package.metadata.docs.rs]
+all-features = true

[features]
default = []

Modified tique/README.markdown

@@ -35,16 +35,28
let similarity_query = keywords.into_boosted_query(1.0);
```

+### QueryParser
+
+A query parser with a simple grammar geared towards usage by
+end-users, with no knowledge about IR, your index nor boolean
+logic.
+
+Supports multiple fields, boosts, required (+) and restricted (-)
+items and can generate queries using `DisMaxQuery` for better
+results when you have fields with very similar vocabularies.
+
+**NOTE**: Requires the `queryparser` compilation feature.
+
+```rust
+let parser = tique::QueryParser::new(&index, vec![name, ingredients])?;
+
+if let Some(query) = parser.parse(r#"+bacon cheese -ingredients:olive "deep fry""#) {
+ // Do your thing with the query...
+}
+
+```
+
## Dependency Policy

This library's default dependency will always be just `tantivy`, anything
that requires more will be added as optional feature.
-
-## Unstable
-
-This crate contains unpolished functionality that is made available
-through the `unstable` feature flag:
-
-* `query_parser`: A very simple query parser that only knows about term
- and phrase queries (and their negation). Mostly an excuse to play
- with `nom`

Modified tique/README.tpl

Binary data

Modified tique/src/lib.rs

@@ -48,6 +48,8
//! items and can generate queries using `DisMaxQuery` for better
//! results when you have fields with very similar vocabularies.
//!
+//! **NOTE**: Requires the `queryparser` compilation feature.
+//!
//! ```rust
//! # use tantivy::{Index, schema::Field};
//! # fn test(index: &Index) -> tantivy::Result<()> {