Skip to content

Commit 69306f6

Browse files
committed
update documentation for json index
Signed-off-by: Paul-Elliot <peada@free.fr>
1 parent 75461b6 commit 69306f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/driver.mld

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,11 @@ Some more details about the json format:
754754
{- ["display"], which is a json object. It contains two fields:
755755
{ul
756756
{- ["url"], a string. It is the URL to the entry in the documentation, relative to the base of the documentation}
757-
{- ["html"], also a string. It is the html odoc uses to display the entry in the search results.}}}}}}
757+
{- ["html"], also a string. It is the html odoc uses to display the entry in the search results.}}}
758+
{- 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:
759+
{ul
760+
{- ["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].}
761+
{- ["indirect"], an integer containing the number of indirect uses of the entry.}}}}}}
758762

759763
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.
760764

0 commit comments

Comments
 (0)