Giter Site home page Giter Site logo

ecolex-prototype's Introduction

Ecolex Prototype

Project Name

The Project Name is Ecolex Prototype.

SOLRCloud

Requirements

  1. one or multiple servers running your choice of Linux flavor (the steps below were tested on CentOS Linux 7).
  2. JRE (at least 1.7) on each node.

Installation

Download and install (as superuser) solr inside /var/local/solr-x.y.z:

$ cd /var/local
$ wget http://mirrors.hostingromania.ro/apache.org/lucene/solr/4.10.3/solr-4.10.3.tgz
$ cd solr-4.10.3/example
$ ls webapps/

There should be a solr.war file inside the webapps folder.

Configure a new collection starting from collection1:

$ cp -r solr/collection1 solr/ecolex_conf

Replace the collection's schema with the one from the repo:

$ cp /var/local/ecolex-prototype/configs/schema.xml solr/ecolex_conf/conf/

Start SOLR (by default it uses the port 8983):

$ java -DzkHost=localhost:2181 -jar start.jar

ZK will run just on one node, so when installing SOLR on other nodes, use the LAN_IP to connect to ZK.

$ java -DzkHost=10.0.0.98:2181 -jar start.jar

You can now check the admin page on any of the SOLR nodes:

http://127.0.0.1:8983/solr/admin/

If you modified the schema.xml or the solrconfig.xml and want to update it, use the "Core Admin" panel from the Solr dashboard (http://127.0.0.1:8983/solr/#/~cores/) . Press the reload button and configuration files will update.

Django application

We are using Python 3 for the web server application. Initialize an environment with:

$ pyvenv sandbox
$ source sanbox/bin/activate
$ pip install -r requirements.txt
$ ./manage.py treaties_cache

Run with:

$ ./manage.py runserver

Configuration settings

Create a file local_settings.py in the same path as manage.py. There are two axamples of local_settings file inside the ecolex directory: one is used for initial data import (which will import all data), and the other one for the data updates (queryes the new records for the previous month).

To enable spelling suggestions, set:

TEXT_SUGGESTION = True

If you wish to attach the rich text content when adding the treaties, start a tika server locally and set TEXT_UPLOAD_ENABLED in import_elis.py (you can configure the tika connection details in contrib/utils.py).

Cron job for document updates:

The Dockerfile has rules for installing cron in container, and it imports the crontab.example
into it. If the cron is not running check with `crontab -l` that there is a newline at the end
of the file. If still not working try to restart the cron service with `/etc/init.d/cron restart` command runned inside the container.

ecolex-prototype's People

Contributors

melish avatar alexef avatar anaion avatar ppscvalentin avatar catalinb avatar mihai-macaneata avatar cdog avatar dafinaj2 avatar cristiroma avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.