GithubHelp home page GithubHelp logo

ryman / searchspot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from honeypotio/searchspot

0.0 3.0 0.0 588 KB

The service responsible for Honeypot's ElasticSearch data

Home Page: http://blog.honeypot.io/open-sourcing-searchspot/

License: BSD 2-Clause "Simplified" License

Rust 100.00%

searchspot's Introduction

Searchspot

Build Status

This service is responsible for Honeypot's ElasticSearch data and is mainly powered by rs-es and iron. Companies on Honeypot use it to search the developers they need to hire.

We hope that it will be useful to anyone who needs a search engine with a more-or-less complex system of data filtering (including strings, dates and booleans querying and full text search).

Things that are missing

  • Proper indentation

Dependencies

  • Rust Nightly
  • ElasticSearch 2.x (1.6+ here)

Setup

Install the latest release of Rust using either rustup, the official way or your package manager (i.e.: brew install rust)).

Then clone this repository to your computer and run the executable with

$ cargo run examples/default.toml

You can generate an optimized executable just appending --release, but the compile time will be longer.

You can execute $ cargo test to run the tests and $ cargo doc to generate the documentation.

Please make sure you have an ElasticSearch instance running.

Example

You can create your own searchspot creating a new executable with cargo, whose main.rs will look like ours, but instead of using searchspot::resources::user::Talent you'll need to replace it with a new resource made by you, according to your needs.

Basically, a resource is any struct that implements the trait searchspot::resource::Resource.

Authentication

When the authentication is enabled, the server accepts only requests that provide an Authentication header containing a valid TOTP token generated using the secrets defined in searchspot's auth.read or auth.write depending from the kind of request (either GET or POST/DELETE), i.e.: { "Authorize" => "token 492039" }.

Heroku

To deploy this application on Heroku, just run

$ heroku create my-searchspot --buildpack https://github.com/Hoverbear/heroku-buildpack-rust
$ heroku ps:scale web=1`

You need also to set the following environment variables (example in parentheses):

  • ES_URL (https://user:[email protected]:80)
  • ES_INDEX (my_index)
  • HTTP_HOST (0.0.0.0)
  • AUTH_ENABLED (true)
  • AUTH_READ (icsbqwdg7ukqluav)
  • AUTH_WRITE (7x2ockhyff4fmm5n)

You can get the data for ES_URL by adding an addon ((☞゚∀゚)☞) for ElasticSearch to my-searchspot and click on it.

AUTH_ is optional – if omitted the feature will be turned off.

Versioning

Unfortunately we didn't use the semantic versioning from the very beginning. We'll bump the minor version when a relevant change is done or a reindex is needed, otherwise a patch will be released. No major version is currently planned to be released.

License

Copyright © 2016 Honeypot GmbH. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About Honeypot

Honeypot

Honeypot is a developer focused job platform.

The names and logos for Honeypot are trademarks of Honeypot GmbH.

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.