Giter Site home page Giter Site logo

rummager's Introduction

Rummager

Rummager is the internal GOV.UK API for search.

Live examples

This API is publicly accessible:

https://www.gov.uk/api/search.json?q=taxes Screenshot of API Response

Technical documentation

This is a Sinatra application that provides an API for search to multiple applications. It isn't supposed to be used by regular users, but it is publicly available on gov.uk/api/search.json.

Dependencies

Setup

To create indices, or to update them to the latest index settings, run:

RUMMAGER_INDEX=all bundle exec rake rummager:migrate_index

If you have indices from a Rummager instance before aliased indices, run:

RUMMAGER_INDEX=all bundle exec rake rummager:migrate_from_unaliased_index

If you don't know which of these you need to run, try running the first one; it will fail safely with an error if you have an unmigrated index.

Running the application

If you're running the GDS development VM:

cd /var/govuk/development && bundle exec bowl rummager

If you're not running the GDS development VM:

./startup.sh

Rummager should then be available at rummager.dev.gov.uk.

Rummager has an asynchronous mode, using sidekiq to manage index workers in a separate process. It is disabled in development by default. To run this in the development VM, you need to run both of these commands:

# to start the sidekiq process
ENABLE_QUEUE=1 bundle exec rake jobs:work
# to start the rummager webapp
ENABLE_QUEUE=1 bundle exec mr-sparkle --force-polling -- -p 3009

Rummager can subscribe to a queue of updates from publishing-api, backed by rabbitmq. At present Rummager is only interested in updates to the links hash. You can start the message queue consumer process in development by running:

govuk_setenv rummager bundle exec rake message_queue:index_documents_from_publishing_api

Running the test suite

bundle exec rake

Indexing & Reindexing

After changing the schema, you'll need to migrate the index.

RUMMAGER_INDEX=all bundle exec rake rummager:migrate_index

API documentation

For the most up to date query syntax and API output:

Additional Docs

Licence

MIT License

rummager's People

Contributors

dhwthompson avatar tijmenb avatar jamiecobbett avatar rboulton avatar heathd avatar alext avatar tarastockford avatar kushalp avatar jystewart avatar evilstreak avatar matthewford avatar jordanhatch avatar threedaymonk avatar elliotcm avatar tommyp avatar daibach avatar richardjpope avatar mnowster avatar floehopper avatar garethr avatar bradwright avatar bishboria avatar jackscotti avatar craigw avatar tomafro avatar chrisroos avatar john-griffin avatar robyoung avatar h-lame avatar kalleth avatar

Watchers

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