added a primitive full-text search index in libsg. This can be use for finding an abstract tree whose linearization matches given keywords

This commit is contained in:
krasimir
2015-12-20 14:04:52 +00:00
parent 0b9395fd70
commit bef9d8c5fc
6 changed files with 413 additions and 102 deletions

View File

@@ -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