lucene-query-syntax

Crates.iolucene-query-syntax
lib.rslucene-query-syntax
version0.1.1
created_at2025-08-17 00:29:15.917624+00
updated_at2025-08-17 02:39:30.09173+00
descriptionParses a subset of the Apache Lucene query syntax
homepage
repositoryhttps://gitea.kroltan.me/Troposphir/lucene2sql
max_upload_size
id1799010
size12,475
Leonardo Giovanni Scur (kroltan)

documentation

README

lucene-query-syntax

Converts (a subset of) the Lucene query syntax to SQL queries.

Currently, it supports the following features:

  • Words: single words, like potato;
  • Phrases: quoted strings, such as "some stuff";
  • Named words or phrases: a word or phrase prefixed by <fieldname>:;
  • Groups: parenthesized queries of any sort;
  • Negation: negates the condition of any term by prefixing it with -;
  • Ranges: numeric ranges in the format {a TO b} or [a TO b], for exclusive and inclusive ranges, respectively.

Purpose

This was developed for the purpose of being used internally in the main Troposphir, through lucene2sql.

Advanced Lucene features such as weights and fuzzy searches are unimplemented due to not being possible in naive SQL, and/or not used in the game's search feature.

Commit count: 0

cargo fmt