Skip to content

Apache Tika

Pull text and metadata out of PDFs, Office files and other documents, detect their type and language, and OCR scanned images

Connector software
Free and open source
Service credentials
Not needed
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/tika/index.md to help me query Apache Tika with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Extract text and metadata from a PDF

Uses a public sample PDF. Replace its URL with a local file path to read your own document.

Example output · captured
Connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
SET VARIABLE pdf = (SELECT content FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-tika/v0.4.2/test/sql/data/multipage.pdf'));
SELECT content, mime, n_pages FROM tika.main.extract_text(getvariable('pdf'));
Result
content mime n_pages
First page alpha content. Second page beta content. Third page gamma con… application/pdf 3

Quick start

Choose where to run Apache Tika, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the signed image

Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.

ATTACH 'tika' AS tika (
  TYPE vgi,
  LOCATION 'oci://ghcr.io/query-farm/vgi-tika:0.5.0'
);

3. Run a query

query.sql
SET VARIABLE pdf = (SELECT content FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-tika/v0.4.2/test/sql/data/multipage.pdf'));
SELECT content, mime, n_pages FROM tika.main.extract_text(getvariable('pdf'));
More example queries →
Technical details
Verified connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the signed image

Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.

ATTACH 'tika' AS tika (
  TYPE vgi,
  LOCATION 'oci://ghcr.io/query-farm/vgi-tika:0.5.0'
);

Overview

Document text, metadata, and OCR extraction (Apache Tika)

Catalog

Everything tika exposes once attached — read straight from the worker's released build.

tika 1 schema
main 7 functions

Apache Tika document text, metadata, and OCR extraction functions.

Schema examples (7)
Examples (7)

Extract the plain-text body and detected media type from a single document.

SELECT content, mime
FROM tika.main.extract_text('A plain-text body.'::BLOB);

Read a document's media type and page count without extracting its body text.

SELECT mime, n_pages FROM tika.main.metadata('Some document bytes.'::BLOB);

Detect the media (MIME) type of a document from its raw bytes.

SELECT tika.main.detect_mime('Plain text.'::BLOB);

Detect the natural-language code of a body of text.

SELECT tika.main.detect_lang('The quick brown fox jumps over the lazy dog.');
3 more examples

Batch-extract a whole column of documents, passing an id column through onto every output row.

SELECT id, content
FROM tika.main.extract_all((SELECT * FROM (VALUES (1, 'Body bytes.'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body');

Language breakdown of a document corpus: extract every body with extract_all, tag it with detect_lang, and send bodies whose detect_lang_conf is below 0.5 (or undetectable) to 'und'. Returns en [1, 4] and und [5, 6] (2 docs each), then de [3] and fr [2].

SELECT CASE WHEN tika.main.detect_lang_conf(content) >= 0.5 THEN tika.main.detect_lang(content) ELSE 'und' END AS language,
  count(*) AS docs, list(id ORDER BY id) AS ids
FROM tika.main.extract_all((SELECT id, body FROM (VALUES (1, 'The quarterly report shows strong growth across every region this year.'::BLOB), (2, 'Le rapport trimestriel montre une forte croissance dans toutes les regions.'::BLOB), (3, 'Der Quartalsbericht zeigt ein starkes Wachstum in allen Regionen.'::BLOB), (4, 'Our customers renewed their contracts early and expanded their usage.'::BLOB), (5, 'OK'::BLOB), (6, 'PO-88213'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body')
GROUP BY language
ORDER BY docs DESC, language;

Triage a mixed inbox of raw bytes: detect_mime sniffs each blob so only the HTML pages go through extract_all (the PNG, id 2, is skipped), then each page's <title> is read from the metadata map and its body language tagged with detect_lang (1 'Q3 Update' en, 3 'Point trimestriel' fr).

WITH inbox(id, body) AS (VALUES (1, '<html><head><title>Q3 Update</title></head><body><p>Revenue grew in every region this quarter and margins improved.</p></body></html>'::BLOB), (2, '\x89PNG\x0D\x0A\x1A\x0A\x00\x00\x00\x0DIHDR'::BLOB), (3, '<html><head><title>Point trimestriel</title></head><body><p>Le chiffre d''affaires a progresse dans toutes les regions ce trimestre.</p></body></html>'::BLOB)) SELECT x.id, x.meta['dc:title'] AS title, tika.main.detect_lang(x.content) AS language
FROM tika.main.extract_all((SELECT id, body FROM inbox WHERE tika.main.detect_mime(body) = 'text/html'), id := 'id', doc_column := 'body') AS x
ORDER BY x.id;
Scalar functions
detect_lang (text VARCHAR) 2 examples

Detect the ISO-639 language code of a piece of text (Apache Tika language detection).

Arguments
text VARCHAR
The text whose dominant natural language to detect — typically an extracted document body from `extract_text`. Text that is empty or too short to classify yields a NULL result.
ReturnsVARCHAR
Examples (2)

Detect the ISO-639 language code of a piece of text (returns 'en' here).

SELECT tika.main.detect_lang('The quick brown fox jumps over the lazy dog.');

Detect the language of an extracted document's body text.

SELECT content, tika.main.detect_lang(content) AS lang
FROM tika.main.extract_text('Bonjour le monde, ceci est un texte en francais.'::BLOB);
Link
detect_lang_conf (text VARCHAR) 3 examples

Confidence (0.0-1.0) of the top detected language for a piece of text (Apache Tika language detection); the companion score to detect_lang.

Arguments
text VARCHAR
The text to score for language-detection confidence — typically an extracted document body. Text that is empty or cannot be classified yields a NULL confidence.
ReturnsDOUBLE
Examples (3)

Confidence (0.0-1.0) of the top detected language for a piece of text.

SELECT tika.main.detect_lang_conf('The quick brown fox jumps over the lazy dog.');

Report the detected language and its confidence for an extracted document body.

SELECT tika.main.detect_lang(content) AS lang,
  tika.main.detect_lang_conf(content) AS conf
FROM tika.main.extract_text('The annual report covers quarterly results.'::BLOB);

Language breakdown of a document corpus: extract every body with extract_all, tag it with detect_lang, and send bodies whose detect_lang_conf is below 0.5 (or undetectable) to 'und'. Returns en [1, 4] and und [5, 6] (2 docs each), then de [3] and fr [2].

SELECT CASE WHEN tika.main.detect_lang_conf(content) >= 0.5 THEN tika.main.detect_lang(content) ELSE 'und' END AS language,
  count(*) AS docs, list(id ORDER BY id) AS ids
FROM tika.main.extract_all((SELECT id, body FROM (VALUES (1, 'The quarterly report shows strong growth across every region this year.'::BLOB), (2, 'Le rapport trimestriel montre une forte croissance dans toutes les regions.'::BLOB), (3, 'Der Quartalsbericht zeigt ein starkes Wachstum in allen Regionen.'::BLOB), (4, 'Our customers renewed their contracts early and expanded their usage.'::BLOB), (5, 'OK'::BLOB), (6, 'PO-88213'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body')
GROUP BY language
ORDER BY docs DESC, language;
Link
detect_mime (doc ANY) 3 examples

Detect a document's MIME type from its bytes or a file path (Apache Tika).

Arguments
doc ANY
The document to sniff. Pass either the raw document bytes inline (detected from its magic bytes) or a filesystem path the worker opens; the worker dispatches on the runtime value.
ReturnsVARCHAR
Examples (3)

Detect the MIME type of inline document bytes (returns 'text/plain').

SELECT tika.main.detect_mime('Hello, plain text body.'::BLOB);

Detect the MIME type of a PDF read as bytes with read_blob() (returns 'application/pdf'); a local file path works the same.

SELECT tika.main.detect_mime(content)
FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-tika/v0.4.0/test/sql/data/hello.pdf');

Triage a mixed inbox of raw bytes: detect_mime sniffs each blob so only the HTML pages go through extract_all (the PNG, id 2, is skipped), then each page's <title> is read from the metadata map and its body language tagged with detect_lang (1 'Q3 Update' en, 3 'Point trimestriel' fr).

WITH inbox(id, body) AS (VALUES (1, '<html><head><title>Q3 Update</title></head><body><p>Revenue grew in every region this quarter and margins improved.</p></body></html>'::BLOB), (2, '\x89PNG\x0D\x0A\x1A\x0A\x00\x00\x00\x0DIHDR'::BLOB), (3, '<html><head><title>Point trimestriel</title></head><body><p>Le chiffre d''affaires a progresse dans toutes les regions ce trimestre.</p></body></html>'::BLOB)) SELECT x.id, x.meta['dc:title'] AS title, tika.main.detect_lang(x.content) AS language
FROM tika.main.extract_all((SELECT id, body FROM inbox WHERE tika.main.detect_mime(body) = 'text/html'), id := 'id', doc_column := 'body') AS x
ORDER BY x.id;
Link
ocr (doc ANY) 2 examples

OCR an image or scanned PDF (bytes or path) via Tika's Tesseract parser; returns NULL when Tesseract is unavailable.

Arguments
doc ANY
The image or scanned PDF to OCR. Pass either the raw bytes inline or a filesystem path the worker opens; the worker dispatches on the runtime value.
ReturnsVARCHAR
Examples (2)

OCR a scanned image read as bytes with read_blob(), using the default English model; returns the card's text starting 'LIBRARY RETURN CHECKLIST' (NULL if Tesseract is not installed).

SELECT tika.main.ocr(content)
FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-tika/fbe9bce2524010aa5b0ec8f4456c05f4082fa1b5/notebooks/assets/scan-card.png');

Split the OCR'd text of a scanned card into its non-blank lines, one row per line (4 rows; no rows if Tesseract is not installed).

SELECT line
FROM (SELECT unnest(string_split(tika.main.ocr(content), chr(10))) AS line FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-tika/fbe9bce2524010aa5b0ec8f4456c05f4082fa1b5/notebooks/assets/scan-card.png'))
WHERE trim(line) <> '';
Link
Table functions
extract_text (doc ANY, by_page := BOOLEAN, lang := VARCHAR, ocr := BOOLEAN, strict := BOOLEAN) 5 examples

Extract text, metadata, language, and page count from a document (PDF, DOCX, PPTX, XLSX, HTML, EML, RTF, ODF, images) via Apache Tika.

Positional arguments
doc ANY
The document to extract. Pass either a filesystem path (the worker opens and reads the file) or the raw document bytes inline; the worker dispatches on the runtime value.
Named arguments
by_page := BOOLEAN
When true, emit one row per page with a leading 1-based `page` column (real per-page splitting for PDFs; other formats fall back to a single page row). When false (default), emit one row for the whole document. · default false
lang := VARCHAR
Tesseract OCR language(s) to use when OCR runs, as a `+`-joined trained-data list (e.g. `eng` or `eng+deu`). Only consulted when OCR is triggered; defaults to English. · default "eng"
ocr := BOOLEAN
When true, force OCR of the document (images/scanned PDFs) instead of relying on born-digital text extraction. Defaults to false. · default false
strict := BOOLEAN
When true, re-raise any parse error and fail the query instead of capturing it per-row (NULL content + populated `error` column). Defaults to false (errors are captured). · default false
Returns columns
content VARCHAR
Extracted plain-text body of the document, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one in the metadata.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
page INTEGER
1-based page/slide/sheet ordinal.
content VARCHAR
Extracted plain-text body of this page, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Total page count of the source document.
lang VARCHAR
Document language code if Tika reported one in the metadata.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
Returns columns · depends on the arguments
Default (`by_page := false`)
content VARCHAR
Extracted plain-text body of the document, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one in the metadata.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
Per page (`by_page := true`)
page INTEGER
1-based page/slide/sheet ordinal.
content VARCHAR
Extracted plain-text body of this page, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Total page count of the source document.
lang VARCHAR
Document language code if Tika reported one in the metadata.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
Examples (5)

Extract the body text, MIME type, and page count of a single document.

SELECT content, mime, n_pages
FROM tika.main.extract_text('A short plain-text body.'::BLOB);

Split a document into one row per page (leading `page` column).

SELECT page, content
FROM tika.main.extract_text('Single page body.'::BLOB, by_page := true);

Extract from document bytes (a BLOB) and read a metadata key from the `meta` MAP.

SELECT meta['Content-Type'] AS ct
FROM tika.main.extract_text('Some bytes.'::BLOB);
2 more examples
SELECT content, mime
FROM tika.main.extract_text('Hello from a plain-text document body.'::BLOB);
SELECT meta['Content-Type'] AS content_type
FROM tika.main.extract_text('Some document bytes.'::BLOB);
Link
metadata (doc ANY, strict := BOOLEAN) 2 examples

Extract document metadata (MIME, page count, language, full metadata MAP) without the body text, via Apache Tika.

Positional arguments
doc ANY
The document whose metadata to read. Pass either a filesystem path (the worker opens the file) or the raw document bytes inline; the worker dispatches on the runtime value.
Named arguments
strict := BOOLEAN
When true, re-raise any parse error and fail the query instead of capturing it in the `error` column (NULL metadata). Defaults to false (errors are captured per-row). · default false
Returns columns
mime VARCHAR
Detected media type, e.g. application/pdf.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one, else NULL.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag as a MAP(VARCHAR, VARCHAR).
error VARCHAR
Per-row parse error message, or NULL on success.
Examples (2)

Read a document's MIME type, page count, and language without extracting the body text.

SELECT mime, n_pages, lang
FROM tika.main.metadata('A short document body.'::BLOB);

Read a single metadata field from the `meta` MAP.

SELECT meta['Content-Type'] AS ct
FROM tika.main.metadata('Some bytes.'::BLOB);
Link
Table in-out functions
extract_all (input TABLE, doc_column := VARCHAR, id := VARCHAR, ocr := BOOLEAN, lang := VARCHAR) 4 examples

Extract text + metadata for a whole column of documents (paths or bytes), with an id column passed through onto each output row.

Positional arguments
input TABLE
The input relation (a subquery) supplying the documents to extract. A column of this relation holds the documents as filesystem paths or inline bytes (see `doc_column`); one extract row is produced per input row.
Named arguments
doc_column := VARCHAR
Name of the input column holding the documents (filesystem paths or inline bytes). When empty (default), the first column that is not the `id` column is used.
id := VARCHAR
Name of an input column to pass through: it is excluded from parsing and copied verbatim onto every output row so results can be joined back to the source. When empty (default), no passthrough column is emitted.
ocr := BOOLEAN
When true, force OCR of each document (images/scanned PDFs) instead of born-digital text extraction. Defaults to false. · default false
lang := VARCHAR
Tesseract OCR language(s) to use when OCR runs, as a `+`-joined trained-data list (e.g. `eng` or `eng+deu`). Defaults to English. · default "eng"
Returns columns
content VARCHAR
Extracted plain-text body of the document, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
id INTEGER
Passthrough column named by the `id` argument (shown here as `id`), copied verbatim from each input row so results can be joined back. Its name and type mirror the chosen source column — INTEGER in these examples.
content VARCHAR
Extracted plain-text body of the document, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
Returns columns · depends on the arguments
Without id passthrough (`id := ''`)
content VARCHAR
Extracted plain-text body of the document, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
With id passthrough (`id := '<column>'`)
id INTEGER
Passthrough column named by the `id` argument (shown here as `id`), copied verbatim from each input row so results can be joined back. Its name and type mirror the chosen source column — INTEGER in these examples.
content VARCHAR
Extracted plain-text body of the document, or NULL on error.
mime VARCHAR
Detected media type, e.g. `application/pdf`.
n_pages INTEGER
Page/slide/sheet count when the format reports it, else NULL.
lang VARCHAR
Document language code if Tika reported one.
meta MAP(VARCHAR, VARCHAR)
Full Tika metadata bag.
error VARCHAR
Per-row parse error message, or NULL on success.
Examples (4)

Extract every document in an inline column of bytes, keeping the source `id` on each output row to join results back.

SELECT id, content, mime
FROM tika.main.extract_all((SELECT * FROM (VALUES (1, 'First body.'::BLOB), (2, 'Second body.'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body');

Extract from a BLOB column (`body`) of inline document bytes, with the `id` column passed through.

SELECT id, content
FROM tika.main.extract_all((SELECT * FROM (VALUES (1, 'Inline document bytes.'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body');

Language breakdown of a document corpus: extract every body with extract_all, tag it with detect_lang, and send bodies whose detect_lang_conf is below 0.5 (or undetectable) to 'und'. Returns en [1, 4] and und [5, 6] (2 docs each), then de [3] and fr [2].

SELECT CASE WHEN tika.main.detect_lang_conf(content) >= 0.5 THEN tika.main.detect_lang(content) ELSE 'und' END AS language,
  count(*) AS docs, list(id ORDER BY id) AS ids
FROM tika.main.extract_all((SELECT id, body FROM (VALUES (1, 'The quarterly report shows strong growth across every region this year.'::BLOB), (2, 'Le rapport trimestriel montre une forte croissance dans toutes les regions.'::BLOB), (3, 'Der Quartalsbericht zeigt ein starkes Wachstum in allen Regionen.'::BLOB), (4, 'Our customers renewed their contracts early and expanded their usage.'::BLOB), (5, 'OK'::BLOB), (6, 'PO-88213'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body')
GROUP BY language
ORDER BY docs DESC, language;
1 more example

Triage a mixed inbox of raw bytes: detect_mime sniffs each blob so only the HTML pages go through extract_all (the PNG, id 2, is skipped), then each page's <title> is read from the metadata map and its body language tagged with detect_lang (1 'Q3 Update' en, 3 'Point trimestriel' fr).

WITH inbox(id, body) AS (VALUES (1, '<html><head><title>Q3 Update</title></head><body><p>Revenue grew in every region this quarter and margins improved.</p></body></html>'::BLOB), (2, '\x89PNG\x0D\x0A\x1A\x0A\x00\x00\x00\x0DIHDR'::BLOB), (3, '<html><head><title>Point trimestriel</title></head><body><p>Le chiffre d''affaires a progresse dans toutes les regions ce trimestre.</p></body></html>'::BLOB)) SELECT x.id, x.meta['dc:title'] AS title, tika.main.detect_lang(x.content) AS language
FROM tika.main.extract_all((SELECT id, body FROM inbox WHERE tika.main.detect_mime(body) = 'text/html'), id := 'id', doc_column := 'body') AS x
ORDER BY x.id;
Link

Try these queries

Extract the plain-text body and detected media type from a single document.

SELECT content, mime FROM tika.main.extract_text('A plain-text body.'::BLOB)

Uses extract_text

Read a document's media type and page count without extracting its body text.

SELECT mime, n_pages FROM tika.main.metadata('Some document bytes.'::BLOB)

Uses metadata

Detect the media (MIME) type of a document from its raw bytes.

SELECT tika.main.detect_mime('Plain text.'::BLOB)

Uses detect_mime

Detect the natural-language code of a body of text.

SELECT tika.main.detect_lang('The quick brown fox jumps over the lazy dog.')

Uses detect_lang

Batch-extract a whole column of documents, passing an id column through onto every output row.

SELECT id, content
FROM tika.main.extract_all((SELECT * FROM (VALUES (1, 'Body bytes.'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body')

Uses extract_all

Language breakdown of a document corpus: extract every body with extract_all, tag it with detect_lang, and send bodies whose detect_lang_conf is below 0.5 (or undetectable) to 'und'. Returns en [1, 4] and und [5, 6] (2 docs each), then de [3] and fr [2].

SELECT CASE WHEN tika.main.detect_lang_conf(content) >= 0.5 THEN tika.main.detect_lang(content) ELSE 'und' END AS language,
  count(*) AS docs, list(id ORDER BY id) AS ids
FROM tika.main.extract_all((SELECT id, body FROM (VALUES (1, 'The quarterly report shows strong growth across every region this year.'::BLOB), (2, 'Le rapport trimestriel montre une forte croissance dans toutes les regions.'::BLOB), (3, 'Der Quartalsbericht zeigt ein starkes Wachstum in allen Regionen.'::BLOB), (4, 'Our customers renewed their contracts early and expanded their usage.'::BLOB), (5, 'OK'::BLOB), (6, 'PO-88213'::BLOB)) AS t(id, body)), id := 'id', doc_column := 'body')
GROUP BY language
ORDER BY docs DESC, language

Uses detect_lang_confdetect_langextract_all

17 more examples in the Catalog, each listed under the table or function it uses.

Apache Tika is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.