Editing
Corpus/FTS
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== The two-text model == * <code>body</code>: clean displayable content. Always renderable to a user (HTML, links, formatted text). Immutable after ingestion. Never contains noisy OCR or raw PDF binary. * <code>body_search</code>: FTS-optimized text used for indexing. Can be noisy (raw PDF extraction, OCR output) because users never see it directly. Nullable. When NULL, FTS uses body directly. Why two columns: # '''Display vs index separation.''' <code>get_document</code> returns <code>body</code>, so it must always be clean. FTS reads <code>coalesce(body_search, body)</code>, so <code>body_search</code> can hold a noisy-but-indexable representation (e.g., extracted PDF text) without polluting display. # '''PDF-sourced documents.''' When a document is only available as PDF, <code>body</code> is a clean stub like <code><p>Source: <a href="...">PDF officiel</a></p></code> (the LLM follows the link or uses search snippets). <code>body_search</code> holds the pdfminer-extracted text so the document is findable via FTS. # '''Legal reference normalization''' (e.g., "L442-1" to "L442.1") must be consistent between index and query. <code>body_search</code> holds the normalized text; the search plugin applies the same normalization to the query. # <code>body</code> is the source of truth for display and annotation anchoring. It never changes. See ADR-010 for the full rationale of this semantic.
Summary:
Please note that all contributions to Dura Lex Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Dura Lex Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information