PhoenixmlDb.XQuery

FullTextIndex

Full-text inverted index stored in LMDB. Key format: [term_utf8][0x00][container_id:4][document_id:8] Value format: [frequency:2][position_count:2][positions:4*count] The null byte separator allows prefix scanning by term across all documents. Container ID scoping enables per-container full-text queries.

#FullTextIndex

Namespace: PhoenixmlDb.XQuery.FullText

Full-text inverted index stored in LMDB. Key format: [term_utf8][0x00][container_id:4][document_id:8] Value format: [frequency:2][position_count:2][positions:4*count] The null byte separator allows prefix scanning by term across all documents. Container ID scoping enables per-container full-text queries.

#Methods

#GetDocumentFrequency(PhoenixmlDb.Core.Storage.IStorageTransaction,PhoenixmlDb.Core.ContainerId,String,PhoenixmlDb.XQuery.FullText.FullTextAnalysisOptions)

Returns the number of documents containing a term (for IDF calculation).

#IndexDocument(PhoenixmlDb.Core.Storage.IStorageTransaction,PhoenixmlDb.Core.ContainerId,PhoenixmlDb.Core.DocumentId,String,PhoenixmlDb.XQuery.FullText.FullTextAnalysisOptions)

Indexes a document's text content. Call within a write transaction. Analyzes the text using Lucene.NET, then writes term→posting entries.

#RemoveDocument(PhoenixmlDb.Core.Storage.IStorageTransaction,PhoenixmlDb.Core.ContainerId,PhoenixmlDb.Core.DocumentId)

Removes all full-text index entries for a document. Call before re-indexing or when deleting a document.

#SearchTerm(PhoenixmlDb.Core.Storage.IStorageTransaction,PhoenixmlDb.Core.ContainerId,String,PhoenixmlDb.XQuery.FullText.FullTextAnalysisOptions)

Searches for documents containing the given term in a container. Returns posting entries with document IDs, frequencies, and positions.