Dev Resources
Luqum favicon

Luqum

Library/Open Source

Luqum is a Python library for parsing Lucene query expressions and converting them into structured Elasticsearch DSL queries. It helps developers safely interpret, transform, and analyze Lucene style search syntax without hand rolling parsers.

Luqum's website screenshot

About Luqum

Luqum is a Python library that parses queries written in the Lucene Query DSL and builds an abstract syntax tree for inspecting, analyzing, or manipulating those queries. It can transform Lucene DSL queries into native ElasticSearch JSON DSL queries, and it allows enriching the meaning of Lucene query syntax, such as supporting nested object searches or applying particular treatments to specific fields.

It is intended for developers working with search systems who want users to continue writing queries in Lucene syntax while controlling how those queries are translated and interpreted for ElasticSearch. The library is dual licensed under Apache 2.0 and LGPLv3, requires Python 3.10+, depends on PLY >= 3.11, and is installable via pip.

Key features

  • Parses Lucene query syntax into an abstract syntax tree
  • Transforms Lucene DSL queries into native ElasticSearch JSON DSL queries
  • Supports nested object searches and custom field-specific treatments
  • Enables inspection, analysis, and manipulation of search queries
  • Installable via pip as a Python package

Frequently asked questions

What is Luqum used for?

Luqum parses queries written in the Lucene Query DSL and builds an abstract syntax tree so they can be inspected, analyzed, or manipulated, including conversion to ElasticSearch's native JSON DSL.

What programming language and version does it require?

Luqum is a Python library compatible with Python 3.10+.

How do I install it?

It can be installed via pip using 'pip install luqum', and it depends on PLY >= 3.11.

Is Luqum free to use?

Yes, it is open source and dual licensed under Apache 2.0 and LGPLv3.

Who is Luqum for?

It is for developers who need to let users write Lucene-style search queries while controlling how those queries map to ElasticSearch, such as supporting nested object searches or custom field behavior.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product

You might also like