lucene-query-syntax 0.1.1

Parses a subset of the Apache Lucene query syntax
Documentation
  • Coverage
  • 56.67%
    17 out of 30 items documented1 out of 2 items with examples
  • Size
  • Source code size: 12.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.11 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kroltan

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.