---
okf_version: "0.3"
type: "Article"
title: "Daten Suchen mit Solr / Lucene"
description: "Seit den 70-er Jahren Datensuche hierarchisch, später relational. Das Speichern und Suchen war eine eigene Applikation. Mit dem Aufkommen der viel grösseren Datenmengen im Internet und dem unstrukturierten Vorkommen entstanden neue Anforderungen an die Suche. Die Entwicklung «No-SQL» (Not Only SQL) spiegelt die Entwicklung in Richtung nicht-relationale Datenbanken. Die Daten werden nicht mehr auf bestimmte"
resource: "https://webmemo.ch/visualisierung/daten-suchen-mit-solr-lucene"
language: de
author: "Walter Schärer"
publisher: "Webmemo Consulting Walter Schärer | Generative AI Beratung"
tags: ["Visualisierung"]
entities:
  - "https://webmemo.ch/author/walter-schaerer"
body_fingerprint: "sha256:5b3fab246b230d9edb0ca7a99bdadcb6e283d7c8175342ec9f5cf3067f7c91b7"
derived_from:
  lineage: unavailable
  source_modified: 2023-05-02T19:38:41+00:00
sources:
  - id: article
    resource: daten-suchen-mit-solr-lucene.article.md
    title: "Daten Suchen mit Solr / Lucene"
    author: "human:https://webmemo.ch/author/walter-schaerer"
    last_modified: 2023-05-02T19:38:41+00:00
timestamp: 2023-05-02T19:38:41+00:00
---

# Daten Suchen mit Solr / Lucene

> Lucene and Solr are open-source search technologies that index documents via inverted indexes and term vectors, enabling fast, relevance-ranked full-text search far beyond traditional SQL-based querying.

## Key points
- **From relational to NoSQL search** — Growing internet data volumes drove a shift from hierarchical/relational storage toward non-relational, index-based approaches separating storage from search.
- **Lucene as search infrastructure** — Lucene (by LucidWorks) indexes documents via term vectors into an inverted index; all dimensions are stored in one index for high-performance retrieval.
- **Solr as search server and GUI framework** — Solr wraps Lucene with an API, manages Search Cores, schemas (text types, umlauts, synonyms), and exposes results over HTTP.
- **Indexing pipeline** — Documents are converted to XML or JSON, then stemmed and tokenized (e.g. 'Drinking a Latte' → 'Drink'/'Latte') using Analyzers, Filters, and Tokenizers before being stored in Lucene.
- **Data ingestion options** — SolrJ (Java), XML/JSON direct upload, or a DataImportHandler (more performant; fetches from web, RSS, filesystems) can be used, though the handler blocks concurrent requests.
- **Faceted search (Guided Navigation)** — Allows drill-down within result sets; dimensions yielding zero results are hidden in advance, eliminating 'no results found' dead ends.
- **Relevance and scoring features** — Boosting weights specific dimensions; precision and recall metrics describe result accuracy; Filter Queries can cut result lists by relevance score.
- **Advanced query capabilities** — Supports fuzzy search, AND/OR/NOT operators, wildcards, phrase slope (non-adjacent words), geo/spatial distance search, and hierarchical facets.
- **User-experience features** — Highlighting, spell-check (index-based suggestions guaranteed to return hits), boundary scanning, auto-completion, query-log completion, and More-Like-This are all available.
- **More-Like-This and keyword relevance** — Shows similar results based on predefined dimensions; keywords appearing in more than ~50% of documents are excluded as noise; good relevance threshold is up to 17% occurrence.
- **Client/Server configuration** — Solr's client/server setup allows customer-specific result lists, insulation from upstream releases, and per-handler faceting and parser configuration.
- **Admin UI for debugging** — Solr's admin interface lets developers inspect index values, test term matching, and debug search configurations graphically.

## Details
Lucene's inverted index approach contrasts with SQL table scans by pre-indexing all searchable dimensions, making queries significantly faster. Solr adds schema management (supporting text types, German text, umlauts, synonym files, and mapping files) and a request-handler layer that can be configured independently per use case. Shingle analysis identifies word-order patterns in multi-word queries by progressively expanding matched word groups.

<!-- WP Optimize page cache - https://teamupdraft.com/wp-optimize/ - page NOT cached -->
