Support DBD::SQLite FTS4 perl custom tokenizers

Aperta
#1,459 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
44/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, perl, sqlite
Ambito
backend, databases

Direzione di ricerca

Start with t/Search/Fulltext/Tokenizer/Ngram.t and reproduce the Unigram tokenizer failure on both execution backends. Trace Search::Fulltext::SQLite through CREATE VIRTUAL TABLE handling in the bundled DBI/SQLite implementation, then add the focused FTS4 callback test described in the issue. Done means the perl tokenizer syntax works and the integration test passes on both backends.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:cpan-port bug

Summary

PerlOnJava's bundled JDBC-backed DBI/SQLite implementation does not support the perl custom tokenizer used by DBD::SQLite FTS4. This prevents Search::Fulltext from using pure-Perl custom tokenizers.

Reproduction

Distribution: Search-Fulltext-Tokenizer-Ngram-0.01

The upstream test constructs Search::Fulltext with:

tokenizer => "perl 'Search::Fulltext::Tokenizer::${tokenizer_name}::get_tokenizer'"

The equivalent minimal reproducer is:

use Search::Fulltext;
Search::Fulltext->new(
    docs      => ['abc'],
    tokenizer => q(perl "Search::Fulltext::Tokenizer::Bigram::get_tokenizer"),
);

PerlOnJava reports:

DBI execute failed: unknown tokenizer: perl

Results

  • Archived CPAN run: 20260918-141920-96054
  • Standard Perl: PASS, 4 tests
  • PerlOnJava JVM backend: FAIL
  • PerlOnJava interpreter backend: FAIL
  • Failing test: t/Search/Fulltext/Tokenizer/Ngram.t, Unigram tokenizer subtest
  • The failure occurs when Search::Fulltext::SQLite executes CREATE VIRTUAL TABLE ... USING fts4(..., tokenize=perl ...).

The target and dependency distributions contain no XS/native code. This is a bundled DBI/SQLite compatibility gap, not an upstream test or environment failure.

Expected behavior

Support the perl FTS4 tokenizer syntax used by DBD::SQLite, or provide a documented compatible implementation that invokes the requested Perl tokenizer callback.

Suggested regression coverage

Add a focused DBI/SQLite test that creates an FTS4 table with tokenize=perl and exercises a Perl tokenizer callback, then retain Search::Fulltext::Tokenizer::Ngram as integration coverage on both execution backends.

Lingua principale
Perl
Stelle
64
Fork
6
Merge medio
5h 25m
PR unite (30g)
157

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fglock/PerlOnJava

Tutte le issue di fglock/PerlOnJava

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.