dice-group / palmetto-py

Python interface for https://github.com/dice-group/Palmetto
Apache License 2.0
40 stars 9 forks source link

include own reference corpus / lucene index #1

Closed vdyke closed 6 years ago

vdyke commented 6 years ago

Hi Ivan,

is there an easy way to include a local Lucene index instead of an endpoint as described in the documentation?

I couldn't find any information in your code/documentation.

Thanks a lot!!

earthquakesan commented 6 years ago

Hi @vdyke !

palmettopy is essentially HTTP wrapper for palmetto HTTP endpoint. If you want to use other indexes, you need to deploy your own palmetto HTTP endpoint. Following instructions from palmetto repo, you can do it using docker as follows:

git clone https://github.com/dice-group/Palmetto && cd Palmetto/webApp
docker build -t palmetto .
docker run -p 7777:8080 -d -m 4G -v /path/to/indexes/:/usr/src/indexes/:ro palmetto

I suppose, that you should be able to put indexes in /path/to/indexes on your local disk and they should be loaded into Palmetto. For example if your indexes in your /home/vdyke/indexes:

docker run -p 7777:8080 -d -m 4G -v /home/vdyke/indexes/:/usr/src/indexes/:ro palmetto

@MichaelRoeder should be able to give more details if necessary.

vdyke commented 6 years ago

Hi @earthquakesan,

thank you for the quick response!

I think I got it running now but had some minor issues which I posted here