Index a document within an externally-owned write transaction.
(
&self,
txn: &WriteTransaction,
tid: TenantId,
collection: &str,
surrogate: Surrogate,
text: &str,
)
| 43 | |
| 44 | /// Index a document within an externally-owned write transaction. |
| 45 | pub fn index_document_in_txn( |
| 46 | &self, |
| 47 | txn: &WriteTransaction, |
| 48 | tid: TenantId, |
| 49 | collection: &str, |
| 50 | surrogate: Surrogate, |
| 51 | text: &str, |
| 52 | ) -> crate::Result<()> { |
| 53 | let tokens = nodedb_fts::analyze(text); |
| 54 | if tokens.is_empty() { |
| 55 | return Ok(()); |
| 56 | } |
| 57 | self.write_index_data(txn, tid, collection, surrogate, &tokens) |
| 58 | } |
| 59 | |
| 60 | /// Core indexing logic: writes postings, doc length, and stats within |
| 61 | /// a transaction. Bypasses the LSM memtable so Origin transactions can |
no test coverage detected