FAQ About Package Searching
Here are answers to the most urgent questions.
Which files can be searched?
You can search in GODI packages, including the imported OASIS packages.
The search is possible in the installed versions of the packages as
well as in the source code.
In the deployed version not all GODI packages are available, but
around 90% of them. This will be improved later.
How are the code files analyzed?
The analyzer can distinguish between types and values in O'Caml code, and
it can find out definitions. This is done by a superficial parsing
technique comparable to what is done in Emacs modes. This means it is not
always 100% correct, but it can cope quite well with syntax errors.
When I search for "M.foo" it does not find all uses of "foo". How come?
Currently, it is not yet tracked which modules are opened. So if there is
a piece of code where "M" is first opened, and then "foo" is used, this
occurrence of "foo" is not associated with "M".
Sometimes my query word is hightlighted, sometimes not?
Generally, highlighting in viewed documents is only supported for text
files, but not for html documents. When you see an abstract with a
hyperlink, a click on this link takes you directly to the occurence of
the search word, e.g. "exists" in
*) val exists : ('a -> bool) -> 'a list -> bool (**
The title link, "List", points to the document as a whole.
Can I search for O'Caml keywords?
No, you cannot. For example, a search for "let" shows only occurrences
where "let" is not used as O'Caml keyword (i.e. in strings or comments).
In some documents I can click on identifiers, and a search box pops up. What's that?
This is the AJAX search. It is only supported in parseable ML files.
You can find an example here:
Note that AJAX is not supported on older browsers. Internet Explorers
seem to have problems with the overlay display - the search box appears
at the bottom of the page instead of as a popup window.
Labels are sometimes considered as types, sometimes as values. Why?
This is a shortcoming in the current parser we'll address at some time.
When a label is used as part of a type expression, it is seen as type
identifier (e.g. "option" in "val foo : ?option:bool -> unit -> string").
When it is used in the "let" definition, it is seen as value identifier
(as in "let foo ?option () = ..."). It is still unclear what is the
right thing to do in this case.
There is a similar problem with methods - they are usually seen as
values, but in an object type they are regarded as types.
Polyvariant type names are sometimes considered as values. Why?
In expressions like "match ... with #foo -> ..." the identifier
"foo" is seen as value, although it is clearly a type name. This is
a known error.
Can I tell my students about GODI Search?
Yes, please tell everybody about it. The server has plenty of resources,
and it is unlikely that it cannot cope with this load. There is also no
risk of ruining me by the increased network traffic - it is a flatrate.
How is this implemented?
Two parts: The "indexer" walks over all documents, parses them, and
outputs lists of words. The "searcher" represents the corpus as
In 2013 we switched to a new searcher technology called Amber, which
is a high-performance full-text search engine developed by myself (Gerd
Stolpmann). It features compression, sophisticated scoring, phrase
queries, and a rich query language.