Coder Social home page Coder Social logo

service-sphinxsearch's Introduction

service-sphinxsearch

Sphinx Search service for RE3

SPHINX doc (2.1.5):

SPHINX Service Adresses:

Staging URL
Dev: http://service-sphinxsearch.dev.bgdi.ch
Int: http://service-sphinxsearch.int.bgdi.ch
Prod: http://service-sphinxsearch.prod.bgdi.ch
Prod public: http://search.geo.admin.ch

Service Setup (update cycle)

$ make template
$ sudo su sphinxsearch
$ make move-template
$ /etc/init.d/sphinxsearch stop
$ /etc/init.d/sphinxsearch start

Service Details:

Port: 9312

Service paths:

Object Path
PID: /var/run/sphinxsearch.pid
Searchd Log /var/log/sphinxsearch/searchd.log
Query Log: /var/log/sphinxsearch/query.log
Indexes: /var/lib/sphinxsearch/data/index/
Configuration: /etc/sphinxsearch/sphinx.conf

Search Daemon:

$ sudo su - sphinxsearch

stop

$ /etc/init.d/sphinxsearch stop

start

$ /etc/init.d/sphinxsearch start

validate config

$ indextool --checkconfig -c /etc/sphinxsearch/sphinx.conf

Rebuild / update Indexes:

rebuild / build some indexes index1 index2 index3

There will be a service restart after every index

$ indexer --verbose --rotate --sighup-each --config /etc/sphinxsearch/sphinx.conf index1 index2 index3

rebuild / build all indexes

$ indexer --verbose --rotate --sighup-each --config /etc/sphinxsearch/sphinx.conf --all

multithread indexer is not possible: http://sphinxsearch.com/forum/view.html?id=3936a

Alternative

You can use the makefile in any directory containing this repository

To see options of make

$ make

To create all indices

make template
sudo su sphinxsearch
make move-template
make index-all

Wordforms

Wordforms are part of the sphinx conf. The swisssearch index (zipcodes) has to be computed after a wordforms update.

Command line debugging with python sphinx api

$ cd lib/sphinxapi
$ python test.py -h localhost -p 9312 -i swisssearch "birgmattenweg 5"

Make Deploy

Before the deploy make sure that the following steps have been done

  • make template
  • make move-template with user sphinxsearch

Deploy config to Integration, no indexes will be built

$ make deploy-int-config

Deploy config to Integration, build all the indexes which are using the database lubis

$ make deploy-int-config db=lubis

Deploy config to Integration, build all the indexes with the given prefix

$ make deploy-int-config index=ch_tamedia_schweizerfamilie-feuerstellen

Deploy config to Integration, build all the indexes from config

You can use one of the following commands to recreate all the indexes on the deploy target from the config file. This may take a while.

$ make deploy-int-config index=all
$ make deploy-int-config db=all

The same commands can be used with make deploy-prod-config.

Deploy config and wordforms to Integration, build all the indexes which are using wordforms

You can use the following commands to deploy the config and the wordform files and recreate all the indexes which are using wordforms. You can find the indexes with wordforms in the config files. Actually the distributed index swisssearchand the indexes layers_** are using wordforms.

$ make deploy-int-config index=swisssearch
$ make deploy-int-config index=layers

The same commands can be used with make deploy-prod-config.

Deploy config to Integration, create all indexes related to specific database

$ cd service-sphinxsearch/
$ git checkout master
$ git pull origin master
$ make template
$ sudo su sphinxsearch
$ make move-template
$ make deploy-int-config db=zeitreihen

Deploy clean_index to Integration

You can use this command to

  • create all the missing indexes
  • remove orphaned indexes The sphinx configuration will not be deployed. The same command can be used with make deploy-prod-clean_index.
$ make deploy-int-clean_index

ℹī¸ With each call of make deploy-int-configor `make deploy-prod-config``the indexes on the deploy target will be synchronized with the new config.

  • new indexes will be generated
  • orphaned indexes will be removed

service-sphinxsearch's People

Contributors

afoletti avatar alcapat avatar ariadnigaki avatar cedricmoullet avatar daguer avatar gjn avatar kandre avatar loicgasser avatar ltclm avatar pfanguin avatar ponceta avatar procrastinatio avatar rebert avatar rfrancel avatar sdaujour avatar sgachet avatar streist avatar

Watchers

 avatar  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.