{
  "slug": "search-index-builder",
  "name": "gizza-ai/search-index-builder",
  "version": "0.1.0",
  "title": "Search Index Builder — full-text inverted index JSON for static sites — gizza.ai",
  "description": "Build an offline full-text search index JSON from documents. Pick fields, store result data, set boosts, and run privately in your browser.",
  "tags": [
    "search index builder",
    "inverted index",
    "full text search",
    "static site search",
    "offline search",
    "tf-idf index",
    "json search index",
    "client side search"
  ],
  "category": "utilities",
  "urls": {
    "page": "https://gizza.ai/tools/search-index-builder/",
    "markdown": "https://gizza.ai/tools/search-index-builder/index.md",
    "descriptor": "https://gizza.ai/tools/search-index-builder/tool.json",
    "deep_link_example": "https://gizza.ai/tools/search-index-builder/?documents=%5B%7B%22id%22%3A%22home%22%2C%22title%22%3A%22Home%22%2C%22url%22%3A%22%2F%22%2C%22body%22%3A%22Welcome%20to%20the%20demo%22%7D%2C%7B%22id%22%3A%22about%22%2C%22title%22%3A%22About%22%2C%22url%22%3A%22%2Fabout%22%2C%22body%22%3A%22We%20build%20offline%20search%22%7D%5D&fields=title%2Cbody&id_field=id&store_fields=title%2Curl&boosts=title%3A3%2Cbody%3A1&lowercase=true&remove_stopwords=true&min_length=1&pretty=true"
  },
  "cli": "gizza tool search-index-builder '[{\"id\":\"home\",\"title\":\"Home\",\"url\":\"/\",\"body\":\"Welcome to the demo\"},{\"id\":\"about\",\"title\":\"About\",\"url\":\"/about\",\"body\":\"We build offline search\"}]'",
  "tool": {
    "description": "Build a serialized full-text search index (an inverted index, as JSON) from a JSON array of document objects, so a static site can search offline with no server. Every indexed field is tokenized (split on non-alphanumeric boundaries) and the index maps each token to the documents it appears in, per field, with a document frequency (df) and a per-document term frequency — everything a client needs to rank with TF-IDF. Pass 'documents' as a JSON array like [{\"id\":\"1\",\"title\":\"Intro\",\"body\":\"Hello world\"}]. Choose which fields to index, which field is the id/ref, and which fields to store for display. Toggle lowercase folding, English stop-word removal, and a minimum token length; record optional per-field ranking boosts. Output is deterministic JSON.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "boosts": {
          "default": "",
          "description": "Optional per-field ranking weights recorded in the output for the query-time ranker, as a 'field:weight' list (e.g. 'title:2,body:1'). Empty (default) records no boosts.",
          "type": "string"
        },
        "documents": {
          "description": "A JSON array of document objects to index, e.g. [{\"id\":\"1\",\"title\":\"Intro\",\"body\":\"Hello world\"}]. This is the in-model stand-in for a folder of documents: a static-site build step reads the folder and passes the array here.",
          "type": "string"
        },
        "fields": {
          "default": "",
          "description": "Comma-separated field names to full-text index (e.g. 'title,body'). Leave empty to index every string-valued field found across the documents, except the id field.",
          "type": "string"
        },
        "id_field": {
          "default": "id",
          "description": "Which field supplies each document's ref (the identifier stored in the index). Default 'id'. When a document lacks this field, its 0-based position in the array is used instead. Refs must be unique.",
          "type": "string"
        },
        "lowercase": {
          "default": true,
          "description": "Case-fold tokens to lowercase for case-insensitive search. Default true; set false to keep tokens case-sensitive.",
          "type": "boolean"
        },
        "min_length": {
          "default": 1,
          "description": "Drop tokens shorter than this many characters, 1-20. Default 1 (keep all). Use 2 or 3 to skip single letters and short noise.",
          "maximum": 20,
          "minimum": 1,
          "type": "integer"
        },
        "pretty": {
          "default": false,
          "description": "Pretty-print the index JSON with indentation. Default false (compact single line, smaller for shipping to a static site).",
          "type": "boolean"
        },
        "remove_stopwords": {
          "default": false,
          "description": "Drop common English stop words (the, and, of, to, …) from the index. Default false.",
          "type": "boolean"
        },
        "store_fields": {
          "default": "",
          "description": "Comma-separated fields to copy verbatim into the output 'documents' store for display alongside search results (e.g. 'title,url'). Empty (default) stores nothing but the ref.",
          "type": "string"
        }
      },
      "required": [
        "documents"
      ],
      "type": "object"
    }
  }
}