# GNO vs Elasticsearch

GNO and Elasticsearch both solve search problems, but they target very different scales and workflows.

Elasticsearch is an enterprise-grade distributed search engine for large teams and production search stacks. GNO is a local-first knowledge workspace for personal, team, and agent-centric document retrieval. They serve different use cases.

## At a Glance

- Choose **Elasticsearch** if you need distributed search infrastructure, analytics, and multi-tenant scale.
- Choose **GNO** if you want a local search and workspace product you can install and use immediately on your own documents.
- Think of Elasticsearch as infrastructure you operate, and GNO as a product you work in.

## Quick Summary

| Aspect              | GNO                        | Elasticsearch         |
| ------------------- | -------------------------- | --------------------- |
| **Best for**        | Personal/team knowledge    | Enterprise search     |
| **Unique strength** | Zero-config, privacy-first | Massive scale, Kibana |
| **Setup time**      | 1 minute                   | Hours to days         |

## Feature Comparison

| Feature              | GNO                           | Elasticsearch              |
| -------------------- | ----------------------------- | -------------------------- |
| **Deployment**       | Local CLI, zero config        | Server, cluster management |
| **Privacy**          | 100% local, offline           | Network service            |
| **Setup Time**       | `bun install -g @gmickel/gno` | Hours/days                 |
| **Vector Search**    | Built-in (sqlite-vec)         | Plugin or version 8+       |
| **AI Answers**       | ✓ Local LLM integration       | ✗ (needs external LLM)     |
| **Remote Inference** | ✓ Simple URI config           | ✓ Complex inference API    |
| **Resource Usage**   | ~500MB RAM                    | GB+ RAM                    |
| **Scaling**          | Single machine                | Distributed clusters       |
| **Cost**             | Free                          | License fees at scale      |
| **Query DSL**        | Simple CLI flags              | Complex JSON DSL           |
| **Aggregations**     | Basic                         | Powerful analytics         |
| **REST API**         | ✓ `gno serve`                 | ✓ Native                   |
| **Web UI**           | ✓ `gno serve`                 | ✓ Kibana                   |
| **Headless Daemon**  | ✓ `gno daemon`                | ✓ Native server            |

## The Key Difference

**Elasticsearch is infrastructure. GNO is a tool.**

```bash
# Elasticsearch: infrastructure setup
docker-compose up -d elasticsearch kibana
# Configure indices, mappings, analyzers...
# Set up ingestion pipelines...
# Configure authentication...

# GNO: immediate productivity
bun install -g @gmickel/gno
gno init ~/notes --name notes
gno index
gno query "your search"
```

## When to Use GNO

**Personal knowledge base**: Your notes, papers, meeting transcripts.

```bash
gno init ~/notes --name notes
gno query "what was that thing about React performance"
```

**Privacy-first search**: Everything stays on your machine.

```bash
# No network calls, no cloud storage
gno index
gno query "confidential project details"
```

**Developer workflows**: AI-native integration with your tools.

```bash
# MCP for Claude, Cursor, Zed, Windsurf
gno mcp install --target cursor

# RAG-style answers
gno ask "how does our auth work" --answer
```

**Headless indexing**: Run GNO as a small always-on indexer without carrying the full web workspace.

```bash
gno daemon
```

**Team knowledge (small scale)**: Shared docs on a network drive or synced folder.

```bash
gno init /shared/docs --name team-docs
gno query "quarterly goals"
```

**Quick setup**: No DevOps required.

```bash
# Install and searching in under 2 minutes
bun install -g @gmickel/gno
gno init ~/Documents --name docs && gno index
gno query "budget projections"
```

## When to Use Elasticsearch

Elasticsearch wins when the search problem is really an infrastructure problem.

**Enterprise scale**: Millions of documents, complex requirements.

```json
{
  "settings": {
    "number_of_shards": 5,
    "number_of_replicas": 2
  }
}
```

**Multi-tenant applications**: Many users searching shared indices.

**Complex analytics**: Aggregations, faceted search, dashboards.

```json
{
  "aggs": {
    "by_category": {
      "terms": { "field": "category" }
    }
  }
}
```

**Existing infrastructure**: You already run Elasticsearch.

**Kibana dashboards**: Visual analytics and exploration.

## Resource Comparison

| Resource    | GNO                 | Elasticsearch (minimal)   |
| ----------- | ------------------- | ------------------------- |
| RAM         | ~500MB              | 2GB+ (4GB+ recommended)   |
| Disk        | Index size ~1x docs | Index size 1.5-2x docs    |
| CPU         | Low (mostly idle)   | Moderate (always running) |
| Network     | None (local)        | Required for clients      |
| Maintenance | None                | Regular ops work          |

## Migration Considerations

If you're considering Elasticsearch for personal/small-team use, try GNO first:

```bash
# Install
bun install -g @gmickel/gno

# Index your documents
gno init ~/Documents --name docs
gno index

# Search
gno query "your search query"

# If you need RAG answers
gno ask "summarize project status" --answer
```

If you outgrow GNO (millions of documents, multi-user requirements, complex analytics), Elasticsearch is there. But for personal and small-team knowledge search, GNO is simpler, faster to set up, and privacy-preserving.

## Different Tools for Different Jobs

| Use Case                   | Recommendation |
| -------------------------- | -------------- |
| Personal notes             | GNO            |
| Team docs (<10 people)     | GNO            |
| Developer second brain     | GNO            |
| E-commerce product search  | Elasticsearch  |
| Log analytics              | Elasticsearch  |
| Enterprise document search | Elasticsearch  |
| Privacy-critical documents | GNO            |

## Next Steps

- Want to see the product surface Elasticsearch does not try to be? Start with [Web UI](../WEB-UI.md).
- Want the retrieval side in more detail? Read [How Search Works](../HOW-SEARCH-WORKS.md).
- Want to try GNO directly? Follow the [Quickstart](../QUICKSTART.md).
