Coder Social home page Coder Social logo

k-search-engine's Introduction

Build Status

K-Search Engine Docker image

The K-Search Engine is a SOLR instance specifically configured for the K-Search component to allow full text retrieval of documents.

Usage

# Pull the image
docker pull klinktechnology/k-search-engine:{version-tag}

# Run the image one time, in this case pressing Ctrl+C will stop the container and remove it
docker run -it --rm -p "8983:8983" --name="k-search-engine" k-search-engine
# now you can connect to http://localhost:8983/solr to browse the SOLR search engine UI

where {version-tag} is the version of the k-search-engine you want to use

Caveats

  • The index name on the search engine is k-search and cannot be customized.
  • the search engine starts in foreground mode, so all log entries are sent to Docker

Commands

The docker image startup support various commands:

  • start (default) starts a SOLR instance with the k-search index on the default 8983 port
  • optimize perform optimization maintenance task, see Optimization section
  • help output the list of available commands

Search index storage

The search engine index is stored in /opt/solr/k-search/k-search/data, you can mount any volume on that folder in order to persist its content.

docker run -it --rm -p "8983:8983" --name="k-search-engine" -v "./local-folder:/opt/solr/k-search/k-search/data" k-search-engine

Building

To build the image execute the docker build command.

# Build the image
docker build -t k-search-engine .

Versions

  • Version 1.0.1 moved to SOLR 7.4. This version is required to use K-Search API version 3.5.
  • Version 0.4.x or below uses SOLR 5.x and can be used up to K-Search API version 3.4.

Check the upgrade section for upgrade instructions

Maintenance operations

Optimization

Sometimes the Search Engine index needs to be optimized. Index optimization is required after search engine upgrades (before adding new documents).

To execute the index optimization run

# operates on a running instance
docker exec {container-name} /opt/solr/start.sh optimize

where {container-name} is the name of the container assigned to the search engine.

The command will output something like

K-Search Engine, based on SOLR 7.4.0.
Optimizing the index...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   148    0   148    0     0    707      0 --:--:-- --:--:-- --:--:--   711
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">52</int></lst>
</response>

While in the log you should see an entry with Starting optimize...

[...] o.a.s.u.DirectUpdateHandler2 Starting optimize... Reading and rewriting the entire index! Use with care.
[...] o.a.s.u.DirectUpdateHandler2 No uncommitted changes. Skipping IW.commit.
[...] o.a.s.c.SolrCore SolrIndexSearcher has not changed - not re-opening: org.apache.solr.search.SolrIndexSearcher
[...] o.a.s.u.DirectUpdateHandler2 end_commit_flush
[...] o.a.s.u.p.LogUpdateProcessorFactory [k-search]  webapp=/solr pa

Upgrade

Upgrade from 0.4.2 to 1.0.x

The index upgrade from 0.4.2 to 1.0 cannot be done automatically, as consequence of the move from SOLR 5 to SOLR 7 directly.

To upgrade delete your current search index before starting the upgraded K-Search Engine container.

License

This project is licensed under the AGPL v3 license, see LICENSE.txt.

k-search-engine's People

Contributors

ailox avatar avvertix avatar thepanz avatar

Watchers

 avatar  avatar

k-search-engine's Issues

Update official docker image url

In the past Docker images have been hosted on docker.klink.asia and partially under the oneofftech DockerHub user. This lead to some confusion and problems in keeping up-to-date the documentation.

In an effort to better organize the distribution of the project we are going to use a single organization to store the Docker images: klinktech.

In particular the K-Search Engine will be available under klinktech/k-search-engine.

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.