I am trying to build a search index like done in the https://github.com/juji-io/datalevin/blob/master/benchmarks/search-bench/src/datalevin/bench.clj, using a search-index-writer . How do i get the document from the kv store after getting the ref(s) from the d/search query?
Thanks for the answers. I misunderstood and did not realise that the search-engine was separate in addition to the actual storage of the documents
Don't understand what you are trying to do
ref is whatever you put in to identify a document.
by default, the document is not stored in the search engine, because we assume you know how to get the document given the ref.
however, you can store the document in the search engine, by setting :include-text? true
When that's the case, you can also return the matching documents in the search results by setting :display :texts in your search opts
Of course, these are not default behaviors as they are slower. The default behavior expects that you know how to get the document given the ref. After all, it's you who come up with a ref for a document.
our search benchmark took the default approach, i.e. we don't store documents and don't retrieve the documents either
we only retrieve the refs, in this case, the wiki page URL.
(d/get-value kv "datalevin/docs" ref) only returns 0. Am i missing something?