From bef9d8c5fce740fde65934b170cca33b121fde67 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 20 Dec 2015 14:04:52 +0000 Subject: added a primitive full-text search index in libsg. This can be use for finding an abstract tree whose linearization matches given keywords --- src/runtime/haskell-bind/SG/FFI.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/runtime/haskell-bind/SG') diff --git a/src/runtime/haskell-bind/SG/FFI.hs b/src/runtime/haskell-bind/SG/FFI.hs index 37c7f8c3a..69e3efe3f 100644 --- a/src/runtime/haskell-bind/SG/FFI.hs +++ b/src/runtime/haskell-bind/SG/FFI.hs @@ -32,6 +32,12 @@ foreign import ccall "sg/sg.h sg_insert_expr" foreign import ccall "sg/sg.h sg_get_expr" sg_get_expr :: Ptr SgSG -> SgId -> Ptr GuPool -> Ptr GuExn -> IO PgfExpr +foreign import ccall "sg/sg.h sg_update_fts_index" + sg_update_fts_index :: Ptr SgSG -> Ptr PgfPGF -> Ptr GuExn -> IO () + +foreign import ccall "sg/sg.h sg_query_linearization" + sg_query_linearization :: Ptr SgSG -> CString -> Ptr GuPool -> Ptr GuExn -> IO (Ptr GuSeq) + foreign import ccall "sg/sg.h sg_insert_triple" sg_insert_triple :: Ptr SgSG -> SgTriple -> Ptr GuExn -> IO SgId -- cgit v1.2.3