Skip to main content

get_document

Function get_document 

Source
pub async fn get_document(
    engine: &MemexEngine,
    id: String,
) -> Result<Option<SearchResult>>
Expand description

Get a document by ID.

§Arguments

  • engine - The MemexEngine instance
  • id - Document identifier to retrieve

§Returns

Option<SearchResult> - The document if found, None otherwise

§Example

if let Some(doc) = get_document(&engine, "visit-123".to_string()).await? {
    println!("Found: {}", doc.text);
}