Skip to content

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

SeekStorm Java REST Client

Logo
Java REST client for the SeekStorm vector & lexical search server.

seekstorm_client_java is open source licensed under the Apache License 2.0

SeekStorm REST client (Java)

Maven Central License

SeekStorm REST client (TypeScript)

GitHub Stars npm License

SeekStorm REST client (Python)

GitHub Stars PyPI License

SeekStorm REST client (C#)

GitHub Stars NuGet version License

SeekStorm REST client (Rust)

GitHub Stars Crates.io Downloads Documentation License Roadmap

SeekStorm multi-tenancy search server

GitHub Stars Crates.io Downloads Docker REST API Documentation License Roadmap

SeekStorm in-process search library

GitHub Stars Crates.io Downloads Documentation License Roadmap

Website | Benchmark | Demo | Repository for SeekStorm Python client | Repository for SeekStorm library, server, Rust client | Roadmap | Blog | X

Build

mvn test

Quick Start

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.seekstorm.client.SeekStormClient;
import com.seekstorm.client.model.SearchRequest;
import com.seekstorm.client.model.SearchResponse;
import com.seekstorm.client.model.SchemaField;
import com.seekstorm.client.model.CreateIndexRequest;
import java.util.List;

ObjectMapper mapper = new ObjectMapper();

SeekStormClient client = SeekStormClient.builder()
    .baseUrl("http://127.0.0.1:8080")
    .apiKey("your-apikey")
    .build();

String live = client.live();
System.out.println(live);

List<SchemaField> schema = List.of(
    new SchemaField(
        "title",
        "Text",
        true,  // store
        true,  // index_lexical
        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null
    )
);

CreateIndexRequest createIndexRequest = new CreateIndexRequest("demo", schema);
long indexId = client.createIndex(createIndexRequest);

JsonNode document = mapper.createObjectNode()
    .put("title", "hello seekstorm");
client.indexDocument(String.valueOf(indexId), document);

client.commitIndex(String.valueOf(indexId));

SearchRequest request = SearchRequest.builder("hello")
    .length(5)
    .build();

SearchResponse response = client.search(String.valueOf(indexId), request);
System.out.println("Total hits: " + response.countTotal());

IntelliSense Guidance

  • SeekStormClient is the synchronous entry point for REST calls.
  • SearchRequest supports lexical, vector, and hybrid query shapes and uses enum-backed fields for result type, query type, rewriting, and search mode. The returnDocuments field specifies what document information should be returned with search results.
  • DocumentOption encapsulates the options for returning documents in search results, including fields, distance fields, and highlights.
  • CreateIndexRequest contains the index name, schema, and nested IndexConfig for all indexing configuration.
  • IndexConfig uses enum-backed fields for similarity, tokenizer, stemmer, compression, clustering, and inference.
  • GetIteratorRequest is the iterator payload for paging through documents.
  • GetDocumentRequest lets you request highlights, fields, and distance fields.
  • ApiKeyQuotaRequest and DeleteApiKeyRequest are for API key lifecycle operations.
  • SearchResponse contains both results (always returned, doc ID and score only) and documents (returned only if returnDocuments was specified in the request).
  • SchemaField describe index layout and field capabilities.

Usage Notes

  • Use the demo API key only for local development.
  • Call commitIndex(...) when you need durable results outside realtime search.
  • Use the raw JsonNode overloads when you want to send server-specific payloads.

Releases

Packages

Contributors

Languages