Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.
/ golucy Public archive

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.

License

Notifications You must be signed in to change notification settings

philipsoutham/golucy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

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

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 (
  golucy "github.com/philipsoutham/golucy/v0.0.1"
)

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

No packages published

Languages