class Meilisearch::Crystal::IndexClient

Overview

A client handle bound to one index uid.

Defined in:

meilisearch/crystal/index_client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client, uid : String) #

[View source]

Instance Method Detail

def client : Client #

[View source]
def delete : TaskResult #

Deletes the bound index.


[View source]
def documents : Documents #

Document operations scoped to this index.


[View source]
def facet_search(request : FacetSearchRequest) : FacetSearchResponse #

[View source]
def metadata : Index #

Fetches the current typed metadata snapshot for this index.


[View source]
def reset_settings : TaskResult #

[View source]
def search(query : Query, as type : T.class) : SearchResponse(T) forall T #

[View source]
def search(q : String | Nil, as type : T.class) : SearchResponse(T) forall T #

[View source]
def search(query : Query) : SearchResponse(JSON::Any) #

Searches this index with a typed query object.


[View source]
def search(q : String | Nil = nil) : SearchResponse(JSON::Any) #

Searches this index from a query string.


[View source]
def settings : Settings #

Fetches this index's current typed settings.


[View source]
def similar(id : String | Int32 | Int64, embedder : String, as type : T.class) : SearchResponse(T) forall T #

[View source]
def similar(id : String | Int32 | Int64, embedder : String) : SearchResponse(JSON::Any) #

[View source]
def stats : Index::Stats #

[View source]
def tasks(limit : Int32 | Nil = nil) : List(Task) #

[View source]
def uid : String #

[View source]
def update(primary_key : String | Nil = nil, new_uid : String | Nil = nil) : TaskResult #

Updates the bound index's primary key or uid.


[View source]
def update_settings(settings : Settings) : TaskResult #

[View source]
def with_tenant_token(api_key_uid : String, search_rules, expires_at : Time | Nil = nil, api_key : String | Nil = client.api_key) : IndexClient #

[View source]