Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

nxsearch: a full-text search engine

License

NotificationsYou must be signed in to change notification settings

rmind/nxsearch

Repository files navigation

TESTS

Work in progress. Upstream at:https://github.com/rmind/nxsearch

nxsearch is a full-text search engine library which is also providedwith a web server integration.

The engine is written in C11 and is distributed under the 2-clause BSD license.

Features

  • Lightweight, simple and fast.
  • BM25andTF-IDF algorithms.
  • Integrates with theSnowball stemmer.
  • Supports fuzzy matching (using the BK-tree with Levenshtein distance).
  • Supports query logic operators, grouping, nesting, etc.
  • Supports filters in Lua for easy extendibility.
  • Basic UTF-8 and internationalization support.

Usage

To try as a web service:

# git submodule update --init --recursive  # ensure you have submodulesdocker-compose up app# spin up the serviceopen http://127.0.0.1:8000/docs# documentation page

TheNXS_BASEDIR environment variable specifies the base directory wherethe indexed documents as well as the application data files are stored.

Shell

# Create the index:curl -XPOST http://127.0.0.1:8000/test-idx# Index some test documents:curl -d"cat dog cow" http://127.0.0.1:8000/test-idx/add/1curl -d"dog cow" http://127.0.0.1:8000/test-idx/add/2curl -d"cat cat cat" http://127.0.0.1:8000/test-idx/add/3# Run a query:curl -s -d"cat" http://127.0.0.1:8000/test-idx/search| jq

Documentation

  • Swagger UI with the endpoint documentation is provided at/docs URL.

  • The Lua filters API can be foundHERE.

  • The C API documentation can be foundHERE.


[8]ページ先頭

©2009-2025 Movatter.jp