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 Instructions for commit a5e4be6.
$ export BUILD_DIR=$HOME/build
$ export LUCY_HOME=$HOME/.local/lucy
$ export PATH=$LUCY_HOME/bin:$PATH
$ export LIBRARY_PATH=$LUCY_HOME/lib
$ export LD_LIBRARY_PATH=$LUCY_HOME/lib
$ export CLOWNFISH_INCLUDE=$LUCY_HOME/share/clownfish/include
$ cd $BUILD_DIR
$ git clone https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
$ cd $BUILD_DIR/lucy-clownfish/runtime/c
$ ./configure
$ make && make test # or gmake
$ ./install.sh --prefix $LUCY_HOME
$ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
$ cd $BUILD_DIR/lucy/c
$ git checkout a5e4be6
$ ./configure
$ make && make test # or gmake
$ ./install.sh --prefix $LUCY_HOME
$ cfc --dest=autogen
$ cp -r autogen/include $LUCY_HOME/includeAdd 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_PATHProvided you have the dependencies in order add this:
import (
"github.com/philipsoutham/golucy"
)then do:
$ go getSee 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/golucyDetails on the docker image can be found here.
