Go bindings for Apache Lucy. The Apache Lucy search engine library provides full-text search for dynamic programming languages. It is a "loose C" port of the Apache Lucene™ search engine library for Java.
Duh.
Works as of commit e19687f9a6b0158308ac7bcafc663296635b107a.
$ export BUILD_DIR=$HOME/build
$ export LUCY_HOME=$HOME/.local/lucy
$ cd $BUILD_DIR
$ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
$ cd $BUILD_DIR/lucy/c
$ git checkout e19687f9a6b0158308ac7bcafc663296635b107a
$ ./configure --prefix=$LUCY_HOME
$ make && make test && make install
$ ./install.sh --prefix $LUCY_HOME
$ cd $BUILD_DIR/lucy/clownfish/runtime/c
$ ./configure --prefix=$LUCY_HOME
$ make && make test && make install
$ ./install.sh --prefix $LUCY_HOME
Add the following to your .profile
or .zshrc
or similar (you will also need to have your GOHOME
and/or GOPATH
set).
export LUCY_HOME=$HOME/.local/lucy
export CGO_LDFLAGS="-L$LUCY_HOME/lib -llucy -lcfish ${CGO_LDFLAGS}"
export CGO_CFLAGS="-I$LUCY_HOME/include ${CGO_CFLAGS}"
export LD_LIBRARY_PATH=$LUCY_HOME/lib:$LD_LIBRARY_PATH
Provided you have the dependencies in order add this:
import (
golucy "github.com/philipsoutham/golucy/v0.0.1"
)
then do:
$ go get
See this example, inspired by this one in C. If you're running docker you can see it in action like so.
$ docker pull psoutham/golucy
$ docker run psoutham/golucy
Details on the docker image can be found here.