Git Product home page Git Product logo

scout's Introduction

scout is a RESTful search server written in Python. The search is powered by SQLite's full-text search extension, and the web application utilizes the Flask framework.

Scout aims to be a lightweight, RESTful search server in the spirit of ElasticSearch, powered by the SQLite full-text search extension. In addition to search, Scout can be used as a document database, supporting complex filtering operations. Arbitrary files can be attached to documents and downloaded through the REST API.

Scout is simple to use, simple to deploy and just works.

Features:

  • Multiple search indexes present in a single database.
  • RESTful design for easy indexing and searching.
  • Simple key-based authentication (optional).
  • Lightweight, low resource utilization, minimal setup required.
  • Store search content and arbitrary metadata.
  • Multiple result ranking algorithms, porter stemmer.
  • Besides full-text search, perform complex filtering based on metadata values.
  • Comprehensive unit-tests.
  • Supports SQLite FTS4.
  • Documentation hosted on ReadTheDocs.

Installation

Scout can be installed from PyPI using pip or from source using git. Should you install from PyPI you will run the latest version, whereas installing from git ensures you have the latest changes.

Alternatively, you can run scout using docker and the provided Dockerfile.

Installation using pip:

$ pip install scout

You can also install the latest master branch using pip:

$ pip install -e git+https://github.com/coleifer/scout.git#egg=scout

If you wish to install from source, first clone the code and run setup.py install:

$ git clone https://github.com/coleifer/scout.git
$ cd scout/
$ python setup.py install

Using either of the above methods will also ensure the project's Python dependencies are installed: flask and peewee.

Check out the documentation for more information about the project.

Running scout

If you installed using pip, you should be able to simply run:

$ scout /path/to/search-index.db

If you've just got a copy of the source code, you can run:

$ python scout/ /path/to/search-index.db

Docker

To run scout using docker, you can use the provided Dockerfile or simply pull the coleifer/scout image from dockerhub:

$ docker run -it --rm -p 9004:9004 coleifer/scout
# scout is now running on 0.0.0.0:9004

Build your own image locally and run it:

$ cd scout/docker
$ docker build -t scout .
$ docker run -d \
    --name my-scout-server \
    -p 9004:9004 \
    -v scout-data:/data \
    scout

scout's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scout's Issues

Scout question

Is scout a webbased (flask) tool for searching sql lite?

Are there any screen shots or live examples you can share?

Behaviour of scout changed in 3.0.0 version

Search Not working for substrings.
Example:
scout.create_document("hello this is just a dummy text","articles")

and searching http://localhost:8000/articles/?q=ello
does not give any result

ImportError: cannot import name 'secure_filename' from 'werkzeug'

Can you help me fix this, I'm getting this error

Traceback (most recent call last): File "/home/jacob/.local/bin/scout", line 11, in <module> load_entry_point('scout==3.0.2', 'console_scripts', 'scout')() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point return ep.load() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load return self.resolve() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/home/jacob/.local/lib/python3.6/site-packages/scout/server.py", line 10, in <module> from scout.models import database File "/home/jacob/.local/lib/python3.6/site-packages/scout/models.py", line 14, in <module> from werkzeug import secure_filename ImportError: cannot import name 'secure_filename'

error

on running python scout/ /path/to/search-index.db

conn = sqlite3.connect(self.database, timeout=self._timeout,
peewee.OperationalError: unable to open database file

TypeError: the JSON object must be str, not 'bytes'

I am trying to run this command on python v3:
client.create_index('test')
and I got this error
TypeError: the JSON object must be str, not 'bytes'

Even if I try to use client.get_index('sample') it gives me same error.
Can you help me out with this.

Manage 2 profiles: 1 public (read only) and 1 admin (write permission)

Hello,

Scout allows you to use a global key to get a full access to the API (GET, POST, ...).

It would have been nice to allow public access without requiring the key for read access (GET endpoints) when an key access is configured, eventually with a quota per IP address.

Other solutions: provide a way to generate readonly token for a more robust solution or provide basic auth mecanism

Best regards and thanks for this useful and simple project !

docker image: no module named 'gevent.wsgi'

$ docker run -it --rm -p 9004:9004 coleifer/scout
Traceback (most recent call last):
  File "/srv/server.py", line 14, in <module>
    from gevent.wsgi import WSGIServer
ModuleNotFoundError: No module named 'gevent.wsgi'

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.