luqum
A Lucene query parser generating ElasticSearch queries and more !
Decision gist · record as of 2026-08-14
Yes. Luqum is actively maintained, has low install friction, carries no known vulnerabilities, and solves a specific problem well: parsing and transforming Lucene queries. Install it if you need to accept Lucene syntax from users and convert it to Elasticsearch or apply custom query logic. Verify the dual license terms (Apache 2.0 / LGPLv3+) match your project's requirements before committing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; earlier versions no longer supported as of 0.14.0.
- Low install friction with a single lightweight dependency (ply >= 3.11).
- Actively maintained; last commit 2026-04-14 with recent version 1.0.0 released 2025-02-18.
License · maintenance · safety
(unclear) — Dual-licensed under Apache 2.0 and LGPLv3+, but license metadata is unclear in the package record. Verify the actual license terms before use in proprietary or GPL-incompatible projects.
last release 2025-02-18 (542 days) · last repo commit 2026-04-14 · 202 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,388,566 downloads/mo, #3,091 on PyPI
Alternatives
Verify before relying
pip install luqum
from luqum.parser import parser
tree = parser.parse('author.last_name:Smith OR author:(age:[25 TO 34])')
print(tree)- Whether license metadata (SPDX/raw) will be clarified in future releases to resolve the 'unclear' treatment flag.
- Performance characteristics when parsing very large or deeply nested Lucene queries.
- Completeness of Elasticsearch DSL transformation support for all Lucene operators and edge cases.
What it is and what it does
Luqum is a Lucene Query DSL parser that builds an abstract syntax tree from Lucene query strings, allowing you to inspect, analyze, and programmatically manipulate search queries. It depends only on PLY (Python Lex-Yacc) and runs on Python 3.10+. The primary use case is transforming user-written Lucene queries into Elasticsearch JSON DSL, while also supporting custom transformations and enrichments—for example, adding support for nested object searches or applying field-specific query logic.
The package has been actively developed since 2016, recently reaching version 1.0.0 (2025-02-18) with support for Python 3.11, 3.12, and 3.13. It handles a range of Lucene features including boolean operations, proximity and fuzzy matching, range queries, wildcards, and escape sequences. The dual Apache 2.0 / LGPLv3+ licensing provides flexibility for most projects, though the package metadata does not yet clearly expose which license applies.
Use it for
- Transform user-facing Lucene query syntax into Elasticsearch JSON DSL for backend execution.
- Validate and analyze Lucene queries before sending them to a search engine.
- Enrich or rewrite Lucene queries programmatically (e.g., add field restrictions, rewrite operators).
- Build query visualization or debugging tools that explain why a query matches certain results.
- Support nested object searches or custom field treatments by intercepting and modifying the query tree.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Luqum is actively maintained, has low install friction, carries no known vulnerabilities, and solves a specific problem well: parsing and transforming Lucene queries. Install it if you need to accept Lucene syntax from users and convert it to Elasticsearch or apply custom query logic. Verify the dual license terms (Apache 2.0 / LGPLv3+) match your project's requirements before committing.
Install
luqum on PyPI
Before you install
Low install friction with a single lightweight dependency (ply >= 3.11). Actively maintained; last commit 2026-04-14 with recent version 1.0.0 released 2025-02-18. Supports Python 3.10+.
Requires Python 3.10 or later; earlier versions no longer supported as of 0.14.0.
License in practice
Dual-licensed under Apache 2.0 and LGPLv3+, but license metadata is unclear in the package record. Verify the actual license terms before use in proprietary or GPL-incompatible projects.
Quickstart
pip install luqum
from luqum.parser import parser
tree = parser.parse('author.last_name:Smith OR author:(age:[25 TO 34])')
print(tree)
Verify before relying
- Whether license metadata (SPDX/raw) will be clarified in future releases to resolve the 'unclear' treatment flag.
- Performance characteristics when parsing very large or deeply nested Lucene queries.
- Completeness of Elasticsearch DSL transformation support for all Lucene operators and edge cases.
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageply |
| Maintenance | Actively maintained 542 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,388,566 / month, #3,091 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Programming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13 |
Evidence: luqum-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lucene query parser”
- luqumParses Lucene Query DSL syntax into an abstract syntax tree, enabling…
- pySigma-backend-elasticsearchTranslates Sigma security rules into Elasticsearch query formats…
- fold-to-asciiConverts Unicode characters outside the basic ASCII range into their…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also elasticsearch-dsl · yaql · elasticsearch8-dsl · pySigma-backend-elasticsearch · ply · django-elasticsearch-dsl · math-verify · luaparser · django-elasticsearch-dsl-drf · mdxpy