Skip to content

Commit

Permalink
update documentation for json index
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Feb 19, 2024
1 parent 75461b6 commit 69306f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/driver.mld
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,11 @@ Some more details about the json format:
{- ["display"], which is a json object. It contains two fields:
{ul
{- ["url"], a string. It is the URL to the entry in the documentation, relative to the base of the documentation}
{- ["html"], also a string. It is the html odoc uses to display the entry in the search results.}}}}}}
{- ["html"], also a string. It is the html odoc uses to display the entry in the search results.}}}
{- Additionally, the ["occurrences"] field exists if and only if the [--occurrences] flag was given to the [odoc compile-index] command. When it exists, it contains a json object, with two fields:
{ul
{- ["direct"], an integer. It is the number of direct use of the entry. For instance, [open M] and [Make(M)] contain direct uses of [M], while [1 + M.v] contains an indirect use of [M] and a direct use of [M.v].}
{- ["indirect"], an integer containing the number of indirect uses of the entry.}}}}}}

Search engines written in OCaml can also call the [Odoc_model.Fold.unit] and [Odoc_model.Fold.page] function, in conjunction with [Odoc_search.Entry.entry_of_item] in order to get an OCaml value of each element to be indexed.

Expand Down

0 comments on commit 69306f6

Please sign in to comment.