[−][src]Struct arangors::index::Index
Represents an Index
in ArangoDB. The following types are
supported:
- Fulltext
- Geo
- Hash
- Persistent
- Skiplist
- Ttl (Time to live)
As different settings may be applied to different index types, use the
[settings
] field on the index to specify the exact type
of the index
including the required settings.
Example
let database = conn.db("test_db").await.unwrap(); let index = Index::builder() .name("doc_test_index_name") .fields(vec!["password".to_string()]) .settings(IndexSettings::Persistent { unique: true, sparse: false, deduplicate: false, }) .build(); let index = database.create_index("test_collection", &index).await?; let delete_result = database.delete_index(&index.id).await.unwrap();
Fields
fields: Vec<String>
name: String
id: String
is_newly_created: Option<bool>
selectivity_estimate: Option<u8>
in_background: Option<bool>
settings: IndexSettings
Implementations
impl Index
[src]
pub fn builder() -> IndexBuilder<((), (), (), (), (), (), ())>
[src]
Create a builder for building Index
.
On the builder, call .fields(...)
(optional), .name(...)
(optional), .id(...)
(optional), .is_newly_created(...)
(optional), .selectivity_estimate(...)
(optional), .in_background(...)
(optional), .settings(...)
(optional) to set the values of the fields (they accept Into
values).
Finally, call .build()
to create the instance of Index
.
Trait Implementations
impl Debug for Index
[src]
impl Default for Index
[src]
impl<'de> Deserialize<'de> for Index
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Index
[src]
Auto Trait Implementations
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,