Giter VIP home page Giter VIP logo

estest's Introduction

ElasticSearch Test

Installation

Elasticsearch

Download the latest package here https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.deb and install it.

# dpkg -i elasticsearch-1.4.2.deb

For more detail instructions, please visit http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_installation.html

head plugin

head is a plugin that allows you to take a look at your indexes and documents and also all the settings in your elasticsearch. It is a very convenient tool.

# cd /usr/share/elasticsearch/bin
# ./plugin -install mobz/elasticsearch-head

After you install the plugin, you can take a look at your elasticsearch through http://localhost:9200/_plugin/head

For more information, please visit http://mobz.github.io/elasticsearch-head/

mmseg plugin

The mmseg plugin is an analysis tool for Chinese (simplified specifically). It is also part of the elasticsearch-rtf project. Take a look at their github page for more detail: https://github.com/medcl/elasticsearch-analysis-mmseg

Download the jar first https://github.com/medcl/elasticsearch-rtf/blob/master/plugins/analysis-mmseg/elasticsearch-analysis-mmseg-1.2.2.jar Remember to get the link from the "Raw" button.

# cd /usr/share/elasticsearch/plugins
# mkdir analysis-mmseg
# cd analysis-mmseg
# wget https://github.com/medcl/elasticsearch-rtf/raw/master/plugins/analysis-mmseg/elasticsearch-analysis-mmseg-1.2.2.jar

Download the data files

# cd /etc/elasticsearch
# mkdir mmseg
# wget https://github.com/medcl/elasticsearch-rtf/raw/master/config/mmseg/chars.dic
# wget https://github.com/medcl/elasticsearch-rtf/raw/master/config/mmseg/units.dic
# wget https://github.com/medcl/elasticsearch-rtf/raw/master/config/mmseg/words.dic
# wget https://github.com/medcl/elasticsearch-rtf/raw/master/config/mmseg/words-my.dic

Start the server

# service elasticsearch start

Dependencies

$ sudo apt-get install libxml2-dev libxslt1-dev python-dev zlib1g-dev

After these packages are installed, use pip to install the requirements

(estest)$ pip install -r requirements.txt

Final steps

Create index

(estest)$ python create_index.py

Start crawling

(estest)$ python scrape.py

Start the server

(estest)$ python server.py

The server runs at port 9528. Open your browser and browse http://localhost:9528/

estest's People

Contributors

yychen avatar

Watchers

James Cloos avatar howard.hy_chen 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.