diff options
author | Dru Sellers <dru@drusellers.com> | 2018-06-13 21:08:42 -0500 |
---|---|---|
committer | Paul Masurel <paul.masurel@gmail.com> | 2018-06-14 11:08:42 +0900 |
commit | 2b8f02764bee459a7f3ca027cd157825782fbfc6 (patch) | |
tree | 5125823a0bf2ff9f56020d26c11531c6b5f88d53 /src/lib.rs | |
parent | 0465876854861fd687f0952e8692f387db546673 (diff) |
Standardizes the Index::create_* APIs (#317)
* Pull all creation methods next to each other
The goal here is to make it clear which methods are performing the
same function, and to assist with standardizing the API calls.
* Make `from_directory` private
This seems to be an internal function, so lets make it internal.
* Rename `create` to `create_in_dir`
This lets the name match the `create_in_ram` pattern and opens up
`create` for the generic implementation.
* Implement the generic create function
All of the create methods now delegate to the common create function
and future `create_in_*` functions now have a clear pattern
to follow as well
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -55,7 +55,7 @@ //! //! // Indexing documents //! -//! let index = Index::create(index_path, schema.clone())?; +//! let index = Index::create_in_dir(index_path, schema.clone())?; //! //! // Here we use a buffer of 100MB that will be split //! // between indexing threads. |