X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FsearchEngine%2FsearchEngine.ml;h=87546b1ffdff61fbdd0a73e93a859aa087427674;hb=ccb56bd6ddeec70a1fb32304aec60a0721d260cc;hp=111c9b804400d4f555c105b3bbfcd82dc0223258;hpb=9e3da80b505169515fafcbe3ef2438ceb645e35a;p=helm.git diff --git a/helm/searchEngine/searchEngine.ml b/helm/searchEngine/searchEngine.ml index 111c9b804..87546b1ff 100644 --- a/helm/searchEngine/searchEngine.ml +++ b/helm/searchEngine/searchEngine.ml @@ -25,8 +25,6 @@ open Printf -module DB = Dbi_mysql - let debug = true let debug_print s = if debug then prerr_endline s let _ = Http_common.debug := false @@ -37,6 +35,7 @@ exception Invalid_action of string (* invalid action for "/search" method *) let daemon_name = "Moogle" let configuration_file = "/projects/helm/etc/moogle.conf.xml" +(*let configuration_file = "searchEngine.conf.xml" *) let placeholders = [ "EXPRESSION"; "ACTION"; "ADVANCED"; "ADVANCED_CHECKED"; "SIMPLE_CHECKED"; @@ -273,7 +272,7 @@ let exec_action dbd (req: Http_types.request) outchan = match Disambiguate'.disambiguate_term dbd context metasenv ast id_to_uris with - | [id_to_uris,metasenv,term] -> id_to_uris,metasenv,term + | [id_to_uris,metasenv,term,_] -> id_to_uris,metasenv,term | _ -> assert false in let uris = @@ -359,7 +358,7 @@ let callback dbd (req: Http_types.request) outchan = | Chat_unfinished -> () | Http_types.Param_not_found attr_name -> bad_request (sprintf "Parameter '%s' is missing" attr_name) outchan - | CicTextualParser2.Parse_error msg -> + | CicTextualParser2.Parse_error (_, msg) -> send_results (`Error (MooglePp.pp_error "Parse_error" msg)) req outchan | Unbound_identifier id -> send_results (`Error (MooglePp.pp_error "Unbound identifier" id)) req