XQuery Full-Text Examples
✓ Published0🌍 Public
CCliffordAnderson
Last edited Aug 22, 2015
Created on Aug 21, 2015
This example demonstrates XQuery Full-Text search and scoring over the TEI-encoded poems of *Les Fleurs du Mal*. It shows basic text matching with the `contains text` operator, then extends to counting results via `ft:count()`, highlighting matches with `ft:mark()`, extracting snippets with `ft:extract()`, and ranking hits by relevance using `ft:score()` with descending order. The final `search.xqy` combines scoring, marking, and base-URI display, filtering out a specific document. The code uses the XQuery 3.1 `=>` arrow operator for function chaining, and relies on the `fn:collection()` function to access the poem corpus.
AI-generated description