Skip to content

Elastic Search

Kei Kojima edited this page Aug 21, 2020 · 6 revisions

All elastic search code can be found in the elastic_search branch. FYI it's not much. 😃

Note: The Elasticsearch server must be started first. Instructions on how to do that and more info about Elasticsearch are below the line.

A simple, placeholder indexer was created for elastic search -> ElasticSearchIndexer.py.

It can be run by using this command from inside the petal environment -> ./run config/es_search.json

To see if articles were indexed into elastic search run this command ->

curl -X GET "localhost:9200/_search?pretty" -H 'Content-Type: application/json' -d'
{
    "query": {
        "match_all": {}
    }
}
'

Elasticsearch:

Elasticsearch is a real-time distributed search and analytics engine. It allows you to explore your data at a speed and at a scale never before possible. It is used for full text search, structured search, analytics and all three in combination. Elastic search is an open source search engine built on top of Apache Lucene, a full text search engine library.

Installing and running Elasticsearch:

The only requirement for installing Elasticsearch is a recent version of Java. To install Elasticsearch, download and extract the archive file from elastic.co/downlaods/elasticsearch and simply run <path to>\bin\elasticsearch.bat. Test it in browser @ ‘http://localhost:9200’.

Index:

An index is like a database in traditional database. It is the place to store related documents. To retrive any document we would need three pieces of informantion

Index — Database
Datatype — Type of the document
Id — Id of the document

https://medium.com/naukri-engineering/elasticsearch-tutorial-for-beginners-using-python-b9cb48edcedc

What PeTaL Actually Is

Clone this wiki locally