Commit Graph

10 Commits

Author SHA1 Message Date
Atul Bhosale b945d1f602 Run 'cargo fmt' to format code (#489) 2019-03-20 17:56:17 +01:00
fdb-hiroshima 449641d158
Add a search engine into Plume (#324)
* Add search engine to the model

Add a Tantivy based search engine to the model
Implement most required functions for it

* Implement indexing and plm subcommands

Implement indexation on insert, update and delete
Modify func args to get the indexer where required
Add subcommand to initialize, refill and unlock search db

* Move to a new threadpool engine allowing scheduling

* Autocommit search index every half an hour

* Implement front part of search

Add default fields for search
Add new routes and templates for search and result
Implement FromFormValue for Page to reuse it on search result pagination
Add optional query parameters to paginate template's macro
Update to newer rocket_csrf, don't get csrf token on GET forms

* Handle process termination to release lock

Handle process termination
Add tests to search

* Add proper support for advanced search

Add an advanced search form to /search, in template and route
Modify Tantivy schema, add new tokenizer for some properties
Create new String query parser
Create Tantivy query AST from our own

* Split search.rs, add comment and tests

Split search.rs into multiple submodules
Add comments and tests for Query
Make user@domain be treated as one could assume
2018-12-02 17:37:51 +01:00
Trinity Pointard 4e6f3209d5 Normalize panic message
Change all unwrap to expect
Normalize expect's messages
Don't panic where it could be avoided easily
2018-10-20 08:44:33 +02:00
Baptiste Gelez 3a13d80dc6
Merge pull request #267 from Plume-org/db-url
Replace DB_URL with DATABASE_URL
2018-10-07 21:28:28 +01:00
Bat 9cc795d8be Replace DB_URL with DATABASE_URL
This way it is shared with diesel, which simplifies a lot the setup

Also fixes a few issues in the documentation, that are not directly related
2018-10-07 11:00:50 +01:00
Bat 915b9bb0e5 Use env!("CARGO_PKG_VERSION") instead of hardcoding version when possible
See https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates
2018-10-06 18:55:30 +01:00
Bat 4d382d8014 Fix compatibility with SQlite
Also fixes a bug in plume-models
2018-10-06 12:59:08 +01:00
Bat d48a7796f1 User creation CLI tool 2018-10-06 12:19:48 +01:00
Bat 0da5d2e927 Improve the plm instance new command
Add long arguments
Fix the help messages
Actually write to StdOut when needed
Fallback to BASE_URL first if domain is not specified
2018-10-06 12:19:48 +01:00
Bat 6723432e52 CLI tools
- New sub-crate: plume-cli
- Creates a binary called 'plm'
- Uses clap to parse CLI arguments
- Add a first command: plm instance new (to init the local instance)
2018-10-06 12:19:48 +01:00