Module Ufind.Matching

Obtaining detailed matching results

Use this module if select_data is not sufficient for your needs.

For instance, in order to obtain a global ranking of results obtained from different searches, use find and to_list instead of select_data.

type 'a item

Matching item.

val data : 'a item 'a

Extract the data from the matching item.

val find : ?⁠folding:casefolding matching_defect:matching_defect 'a search_item Seq.t string 'a item Seq.t

find sitems name immediately returns the lazy sequence of items matching the given name in the sequence of search items sitems. The returned sequence may be infinite if sitems is infinite.

The matching_defect parameter defines the function used for matching: its first entry is (given by) the provided name.

Warning: the folding parameter must be the same as the one used to create the sitems sequence.

val to_list : 'a item Seq.t 'a item list

Convert the result of find to a sorted list.