Move QueryParser docs into the module
- Id
- 01e9b633e0fbfe0c8bc69a42c9c0df343de6bb87
- Author
- Caio
- Commit time
- 2020-11-26T12:48:11+01:00
Modified tique/src/lib.rs
//! let similarity_query = keywords.into_boosted_query(1.0);
//! # Ok::<(), tantivy::TantivyError>(())
//!```
-//!
-//! ## 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.
-//!
-//! ```no_run
-//! # use tantivy::{Index, schema::Field};
-//! # fn test(index: &Index) -> tantivy::Result<()> {
-//! # let name = tantivy::schema::Field::from_field_id(0);
-//! # let ingredients = tantivy::schema::Field::from_field_id(1);
-//! 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...
-//! }
-//!
-//! # Ok(())
-//! # }
-//! ```
-
pub mod conditional_collector;
pub mod topterms;
Modified tique/src/queryparser/mod.rs
+//! # 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.
+//!
+//! ```no_run
+//! # use tantivy::{Index, schema::Field};
+//! # fn test(index: &Index) -> tantivy::Result<()> {
+//! # let name = tantivy::schema::Field::from_field_id(0);
+//! # let ingredients = tantivy::schema::Field::from_field_id(1);
+//! 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...
+//! }
+//!
+//! # Ok(())
+//! # }
+//! ```
mod parser;
mod raw;