Skip to main content

Module client

Module client 

Source
Expand description

High-level client API for document indexing and retrieval.

This module provides the main entry point for using vectorless:

§Quick Start

use vectorless::client::{Vectorless, VectorlessBuilder};

// Create a client with default settings
let client = Vectorless::new()?;

// Or use the builder for custom configuration
let client = VectorlessBuilder::new()
    .with_api_key("your-api-key")
    .with_workspace("./my_workspace")
    .build()?;

// Index a document
let doc_id = client.index("./document.md").await?;

// Get document structure
let structure = client.get_structure(&doc_id)?;

// List all documents
for doc in client.list_documents() {
    println!("{}: {}", doc.id, doc.name);
}

§Features

  • Document Indexing — Parse and index Markdown, PDF, and text files
  • Tree-Based Structure — Documents organized as hierarchical trees
  • Workspace Persistence — Save and load indexed documents
  • Builder Pattern — Flexible client configuration

Structs§

DocumentInfo
Document info for listing.
IndexOptions
Options for indexing a document.
IndexedDocument
An indexed document with its tree structure and metadata.
PageContent
Content for a single page.
QueryResult
Result of a document query.
Vectorless
The main Vectorless client.
VectorlessBuilder
Builder for creating a Vectorless client.

Enums§

BuildError
Error during client build.
IndexMode
Document indexing mode.