Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

ps0uth/golucy

 
 

Repository files navigation

golucy

golucy

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.

Dependencies

Go

Duh.

Lucy

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/include

Configuration

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

Installation

Provided you have the dependencies in order add this:

import (
  "github.com/philipsoutham/golucy"
)

then do:

$ go get

Example

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.

About

Go bindings for the Apache Lucy full text search library. 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.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages