HTTPS SSH

Relevance: Full-stack search engine

Relevance is a software suite that aims to address the common and recurring problem of ingesting content, delivering it, searching it with relevant results, analyzing its usage by the end-users, acting on the analytic data to provide the best results possible.

Its primary goals are rapid deployment, extensibility and ease of use.

This software is still under heavy development, and is available for preview. Contributions are welcome.

1   Features

1.1   Current features

  • Federated search across ElasticSearch indices
  • Simple configuration
  • Simple query language
  • Simple query API
  • Command line tools
  • Mapping API

1.2   Upcoming features

  • Ingestion API
  • Crawler integration
  • NLP integration

1.3   Planned features

  • Security layer
  • Configuration API
  • Query extensions
  • MySQL support
  • Postgres support
  • Query learning
  • Analytics
  • SQLite support

2   Installation

The fastest way to install is to retrieve the release tarball using git, and install using pip:

# Make sure we have an up-to-date version of pip and setuptools:
$ pip install --upgrade pip setuptools
$ pip install relevance

2.1   Requirements

Currently, a running instance of ElasticSearch 2.x is required.

2.2   Python version

Although Python 3+ should work, all development is done on Python 3.6.2. As such, only 3.6 and newer is currently officially supported.

3   Usage

First, create a your configuration files:

$ cp /etc/search.yml-example /etc/search.yml

Then start the server:

$ python -m relevance.search.service

Then query away:

$ curl -XGET 'http://localhost:55345/myEngine?q="toast"'

The query language is simple and reminiscent of Python expressions:

("term1" or "term2") and str_facet=="value" and interval_facet>10 and other==None

The simple query language support additional options:

"search expr" with slice(10, 10) with sort(date, desc) with facet(popularity, author)

You can also limit search to specific document types:

"search" or "term" with type(tweet, article)

The options, query terms and facets can be mixed and matched.

You can fetch the document types for a specific instance:

$ curl -XGET 'http://localhost:55345/myEngine/mapping'

...and you can describe the mapping for that document type:

$ curl -XGET 'http://localhost:55345/myEngine/mapping/tweet'

4   Documentation

To build the documentation, from the source repository, run:

$ ./setup.py build_apidoc
$ ./setup.py build_sphinx

The documentation will be generated in the build/docs/ directory.

5   Contributing

Contributions are always welcome. If you want to contribute:

  • Fork the project
  • Test your code (see below)
  • Push your code
  • Submit a pull request

5.1   Testing

Contributions must pass both the tests and styling guidelines. Before submitting a patch, make sure you run:

$ ./setup.py test validate

6   About the project

6.2   Licence

MIT License: see LICENSE.

6.3   Authors

Francis Lacroix @netcoder1 created Relevance while at OverrideLogic.