Class IndexClient

java.lang.Object
io.stargate.sdk.rest.IndexClient

public class IndexClient extends Object
Working with indices in the classes.
Author:
Cedrick LUNVEN (@clunven)
  • Field Details

    • indexSchemaResource

      public Function<ServiceHttp,String> indexSchemaResource
      /v2/schemas/keyspaces/{keyspace}/tables/{tableName}/indexes/{indexName}
  • Constructor Details

    • IndexClient

      public IndexClient(LoadBalancedHttpClient stargateHttpClient, TableClient tableClient, String indexName)
      Constructor focusing on a single Column
      Parameters:
      stargateHttpClient - stargateHttpClient
      tableClient - table resource client
      indexName - current index identifier
  • Method Details

    • find

      public Optional<IndexDefinition> find()
      Get metadata of the collection. There is no dedicated resources we use the list and filter with what we need.
      Returns:
      metadata of the collection if its exist or empty
    • exist

      public boolean exist()
      Check if the column exist on the
      Returns:
      boolean
    • create

      public void create(CreateIndex ci)
      Create an index.
      Parameters:
      ci - new index to create
      See Also:
    • delete

      public void delete()
      Delete an index.
      See Also: