PhoenixmlDb.XQuery
FullTextEngine
Full-text search engine powered by Lucene.NET analyzers. Handles tokenization, stemming, and text analysis for XQuery Full-Text queries. Uses Lucene.NET for linguistic analysis (tokenizers, stemmers, stop words) while keeping index storage separate (for LMDB integration).
#FullTextEngine
Namespace: PhoenixmlDb.XQuery.FullText
Full-text search engine powered by Lucene.NET analyzers. Handles tokenization, stemming, and text analysis for XQuery Full-Text queries. Uses Lucene.NET for linguistic analysis (tokenizers, stemmers, stop words) while keeping index storage separate (for LMDB integration).
#Methods
#Analyze(String,PhoenixmlDb.XQuery.FullText.FullTextAnalysisOptions)
Analyzes text into a sequence of terms using the specified language and options. Returns terms with their positions for phrase/proximity matching.
#ContainsPhrase(Collections.Generic.List<PhoenixmlDb.XQuery.FullText.AnalyzedTerm>,Collections.Generic.List<PhoenixmlDb.XQuery.FullText.AnalyzedTerm>)
Checks if source contains the search terms as a phrase: in order, at the same POSITION offsets as in the search text.
Positions carry the gaps a removed stop word leaves. A stop word in the search phrase therefore stands for any one token (XQuery Full Text §3.4.7), and a phrase does not match across a gap it does not have: "walrus carpenter" does not match "the walrus and the carpenter". Matching compared LIST indices, so it did (#30), and a position-aware index disagreed with the evaluator.
#ContainsText(String,String,PhoenixmlDb.XQuery.Ast.FtAnyAllOption,PhoenixmlDb.XQuery.FullText.FullTextAnalysisOptions)
Checks if a text contains the specified search terms according to full-text semantics. This is the core evaluation for "contains text" expressions.
#GetAnalyzer(PhoenixmlDb.XQuery.FullText.FullTextAnalysisOptions)
Builds the analyzer for
, one stage per option, each controlled only by its own option.
This chose between whole Lucene analyzers, and one flag chose two things. Stemming=false picked SimpleAnalyzer, which ALSO has no stop-word filter, so phx:is-stop-word (which asks for no stemming) never saw a stop word removed (#70). With Language null the switch fell through to StandardAnalyzer, which does not stem, so the documented Stemming=true default did nothing (#29). And a query's own `using stop words` / `using no stop words` / `using case sensitive` never reached analysis at all.
#IsDefaultStopWord(String)
The engine's default stop-word list: Lucene's English set, what the analyzer has always removed by default. phx:is-stop-word answers from this list.
#ScoreBM25(Collections.Generic.List<PhoenixmlDb.XQuery.FullText.AnalyzedTerm>,Collections.Generic.List<PhoenixmlDb.XQuery.FullText.AnalyzedTerm>,Int32,Int32,Func<String,Int32>)
Computes a BM25 relevance score for a document against a query.
#WithinWindow(Collections.Generic.List<PhoenixmlDb.XQuery.FullText.AnalyzedTerm>,Collections.Generic.List<PhoenixmlDb.XQuery.FullText.AnalyzedTerm>,Int32)
Checks if terms appear within a window of N positions.