Running examples in ‘ragnar-Ex.R’ failed
The error most likely occurred in:

> ### Name: ragnar_store_create
> ### Title: Create and connect to a vector store
> ### Aliases: ragnar_store_create ragnar_store_connect
> 
> ### ** Examples
> 
> # A store with a dummy embedding
> store <- ragnar_store_create(
+   embed = \(x) matrix(stats::runif(10), nrow = length(x), ncol = 10),
+   version = 1
+ )
> ragnar_store_insert(store, data.frame(text = "hello"))
> 
> # A store with a schema. When inserting into this store, users need to
> # provide an `area` column.
> store <- ragnar_store_create(
+   embed = \(x) matrix(stats::runif(10), nrow = length(x), ncol = 10),
+   extra_cols = data.frame(area = character()),
+   version = 1
+ )
> ragnar_store_insert(store, data.frame(text = "hello", area = "rag"))
> 
> # If you already have a data.frame with chunks that will be inserted into
> # the store, you can quickly create a suitable store with `vec_ptype()`:
> chunks <- data.frame(text = letters, area = "rag")
> store <- ragnar_store_create(
+   embed = \(x) matrix(stats::runif(10), nrow = length(x), ncol = 10),
+   extra_cols = vctrs::vec_ptype(chunks),
+   version = 1
+ )
> ragnar_store_insert(store, chunks)
> 
> # version = 2 (the default) has support for deoverlapping
> store <- ragnar_store_create(
+   # if embed = NULL, then only bm25 search is used (not vss)
+   embed = NULL
+ )
> doc <- MarkdownDocument(
+   paste0(letters, collapse = ""),
+   origin = "/some/where"
+ )
> chunks <- markdown_chunk(doc, target_size = 3, target_overlap = 2 / 3)
> chunks$context <- substring(chunks$text, 1, 1)
> chunks
# @document@origin: /some/where
# A tibble:         24 × 4
   start   end context text 
   <int> <int> <chr>   <chr>
 1     1     3 a       abc  
 2     2     4 b       bcd  
 3     3     5 c       cde  
 4     4     6 d       def  
 5     5     7 e       efg  
 6     6     8 f       fgh  
 7     7     9 g       ghi  
 8     8    10 h       hij  
 9     9    11 i       ijk  
10    10    12 j       jkl  
# ℹ 14 more rows
> ragnar_store_insert(store, chunks)
> ragnar_store_build_index(store)

 *** caught segfault ***
address 0x7a89500, cause 'memory not mapped'

Traceback:
 1: rapi_execute(stmt, convert_opts)
 2: withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }})
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch(withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }}), stackOverflowError = handlers[[1L]])
 7: rlang::try_fetch(rapi_execute(stmt, convert_opts), error = function(e) {    rethrow_error_from_rapi(e, call)})
 8: rethrow_rapi_execute(res@stmt_lst$ref, duckdb_convert_opts_impl(res@connection@convert_opts,     arrow = res@arrow))
 9: duckdb_execute(res)
10: duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)
11: .local(conn, statement, ...)
12: dbSendQuery(conn, statement, ...)
13: dbSendQuery(conn, statement, ...)
14: dbSendStatement(conn, statement, ...)
15: dbSendStatement(conn, statement, ...)
16: dbExecute(con, "INSTALL fts; LOAD fts;")
17: dbExecute(con, "INSTALL fts; LOAD fts;")
18: ragnar_store_build_index_v2(store, type)
19: ragnar_store_build_index(store)
An irrecoverable exception occurred. R is aborting now ...