---
title: "How it searches, by words, by meaning and by image"
description: "Three searches at once (lexical, semantic and visual), fused and reranked; exact phrases in quotes; a modernised-spelling layer for Old Spanish and Latin; and results that arrive in two stages."
url: https://scholaris.joseluissaorin.com/en/knowledge/search
markdown: https://scholaris.joseluissaorin.com/en/knowledge/search.md
lang: en
alternate_es: https://scholaris.joseluissaorin.com/saber/busqueda.md
updated: 2026-10-06
author: José Luis Saorín Ferrer (https://joseluissaorin.com)
---

# How it searches, by words, by meaning and by image

> Three searches at once (lexical, semantic and visual), fused and reranked; exact phrases in quotes; a modernised-spelling layer for Old Spanish and Latin; and results that arrive in two stages.

## Three routes that meet

Every query goes down three routes at once, and the results are fused by reciprocal rank (RRF), with weights that depend on what you seem to be looking for:

| Route | What it finds | How |
| --- | --- | --- |
| Lexical | The words you type, accent-insensitive | SQLite FTS5 index with BM25; section headings and context weigh less than the text |
| Semantic | What the query means, even when the passage uses other words or another language | Gemini Embedding 2 vectors (1536 dimensions) in Cloudflare Vectorize |
| Visual | Plates, figures, charts and video frames | The same multimodal vectors, applied to page images and figures |

| If the query looks like… | lexical | semantic | visual |
| --- | --- | --- | --- |
| an idea | 0.35 | 1 | 0 |
| a literal quotation | 1 | 0.45 | 0 |
| something you can see | 0.35 | 0.6 | 1 |
| a question about dates | 0.35 | 1 | 0 |

The top thirty candidates are reranked by a judge, Jev (by TypeSafe), which answers for each passage whether it addresses the query; the final score is 20 % fusion and 80 % judge. The visual route only counts when you are looking for something visual: on its own it does poorly on text questions and was making them worse.

## Exact phrases

In quotes ("…", “…” or «…») the phrase is searched literally, with no model involved. Exact matches come first, then passages close in meaning. If the phrase appears nowhere, Scholaris says so ("La frase exacta no aparece; se busca por sentido": the exact phrase does not appear, searching by meaning) instead of pretending it found it.

## Old Spanish and Latin {#grafia}

A seventeenth-century book writes "dixo", "muger", "assi" or "agora"; you search for "dijo", "mujer", "así", "ahora". So that they meet without touching the text that is cited, every passage carries a **modernised-spelling shadow** used only for searching, and the query is reduced with the same rules:

- **Spanish, 16th to 18th century:** word lists (fee → fe, agora → ahora, mesmo → mismo, truxo → trajo) and phonetic and spelling rules (b/v, c/z, g/j, h, x → j, ph, rr…);
- **Latin:** u/v, i/j, æ/œ, michi → mihi, the enclitics -que/-ne/-ve and the Schinke et al. (1996) stemmer;
- **Old French and Italian:** basic rules.

The layer always applies to Latin, and to the other languages when the document predates a cut-off (1830 for Spanish, 1800 for French and Italian) or the text itself gives signs (ſ, ç, "assi", "dixo"…). It is rules, no models. On a play by Lope de Vega, average recall per query went from 32 % to 100 %; on modern documents, searches return exactly the same as without the layer (see [Performance](https://scholaris.joseluissaorin.com/en/knowledge/performance.md)).

## Results in two stages

In the app, search arrives in three deliveries over an event stream: first what the lexical index finds, without waiting for the query vector; then the fusion of the three routes, at around 350 ms; and finally the judge's order, at around 650 ms median measured from home. What you see first is already useful and does not get reshuffled all at once.

## Filters

You can filter by library, document, type, author, language and year (from, to). Some filters are understood when written into the query itself: "before 1980", "since 1950", the surname of an author in your library. "Go to page 145" jumps to that printed page.

## What each result returns

The literal passage, its citation ready to paste ("(Foucault, 1975, p. 23)"), the exact locator, the anchor and a link that opens the reader at that page or second. Search never writes a citation: the citation comes from the anchor.

## Also

- **Ask:** a short Markdown answer with footnotes; the writer may only cite the passages it is given, and every note is checked.
- **Similar:** passages and figures similar to a given one.
- **Across languages:** the query translated into the languages of your library.
- **Libraries you follow:** search your own and the ones others share with you at the same time.
