Package: ebv-luqum
luqum - A lucene query parser in Python, using PLY“luqum” (as in LUcene QUery Manipolator) is a tool to parse queries
written in theLucene Query DSLand build an abstract syntax tree
to inspect, analyze or otherwise manipulate search queries.It enables enriching the Lucene Query DSL meanings
(for example to support nested object searches or have particular treatments on some fields),
and transform lucene DSL queries to nativeElasticSearch JSON DSLThanks to luqum, your users may continue to write queries like:author.last_name:Smith OR author:(age:[25 TO 34] AND first_name:John)and you will be able to leverage ElasticSearch query DSL,
and control the precise meaning of each search terms.Compatible with Python 3.4+Installationpip install luqumDependenciesPLY>= 3.11Full documentationhttp://luqum.readthedocs.org/en/latest/Changelog for luqumThe format is based onKeep a Changelogand this project tries to adhere toSemantic Versioning.0.8.0 - 2019-08-02Addedsupport formulti_matchquery inElasticsearchQueryBuilder.FixedSchemaAnalyzer, should count non text fields as not_analyzedElasticsearchQueryBuilder’sfield_optionsparameter
can acceptmatch_typeinstead oftypeto change request type.
This is now the prefered way overtypewhich may more easily conflict with request parameters.0.7.5 - 2018-10-29Addedhandling sub fields (akamulti-fields)Fixedfixed bug on equality, having more children in one tree than in the other,
was not triggering inequality if first nodes were the same !0.7.4 - 2018-08-28Addedhandlingspecial characters escapingaddediter_wildcardsandsplit_wildcardsto have a finer grained search of wildcard in termsFixedfixed bug inluqum.utils.LuceneTreeTransformerwhen removing nodefixed bug in handling approx operator on multiple words inluqum.elasticsearch.visitor.ElasticsearchQueryBuildertest coverage now check branch0.7.3 - 2018-06-08FixedOn ElasticSearch query transformation, Luqum was interpreting wildcards in Phrases where as it should not0.7.2 - 2018-05-14Fixedadding thezero_terms_querytomatch_phrasewas a mistake (introduced in 0.7.0).Added0.7.0 introduced thematchquery for queries with single words on analyzed fields,
whereas before it was usingmatch_phrase.
Although this is more coherent,
this may cause difficulties on edge cases
as this may leads to results different from previous release.This behaviour might be disabled using a newmatch_word_as_phraseparameter
toluqum.elasticsearch.visitor.ElasticsearchQueryBuilder.
Note that this parameter maybe removed in future release.
(thefield_optionsmight be used instead on a per field basis).0.7.1 - 2018-03-20Fixedversion introduced because of a bad upload on pypi (Restructured description error)0.7.0 - 2018-03-20AddedSupport for named queries (seeelastic named queries)Helper to automatically create ElasticSearch query builder options from the index configuration,
see:luqum.elasticsearch.schemaa new argfield_optionsonluqum.elasticsearch.visitor.ElasticsearchQueryBuilderallows to add parameters to field queries.
It also permits to control the type of query for match queries.now for a query with a single word, if the field is analyzed,
the transformation to elastic search query will use a “match” query instead of a “match_phrase”.
This is more conform in behaviour to what the expression of “query_string” would produce.Fixedsmall fix in utils.TreeTransformerV2,
which was not removing elements from lists or tuple as statedsingle word matches, are nowmatch, and notmatch_phrasematch_phrasehas thezero_terms_queryfield, as formatchChangeddropped official Python 3.3 support0.6.0 - 2017-12-12AddedManage object fields in elasicsearch transformationFixedminor fix, getting better error message when parsing error is at the end of contentChangedbetter handling of nested fields may lead to shorter requests0.5.3 - 2017-08-21AddedA class to transform smartly replace implicit operations with explicit one (ORorAND)Fixedhandling of fields names with numbers followed by a number
(better handling of time in expressions)Changednow using ply 3.100.5.2 - 2017-05-29Changedbetter recursion in the tree transformer util (API Change)Fixedhandling of empty phrases for elasticsearch query builder0.5.1 - 2017-04-10a minor releaseChangedBetter handling of the implicit operator on printing0.5.0 - 2017-04-04ChangedOperations are now supporting multiple operands (instead of only two).
This mitigate the construction of very deep trees.Fixedfixes and improvement of documentation0.4.0 - 2016-12-05ChangedThe Lucene query checker now checks nested fields before transformation to prevent bad usage0.3.1 - 2016-11-23AddedSupport for nested fields in Elastic Search queriesChangedimproved performances by adding a cache to the tree visitor utility0.3 - 2016-11-21(Note that 0.2 version was skipped)AddedTransforming Lucene queries to Elastic Search queriesAdded a new tree visitorTreeVisitorV2more easy to useFixedImproved first tree visitor utility and its tests (API Change)0.1 - 2016-05-17This was the initial release of Luqum.Addedthe parser and the tree structurethe visitor and transformer utilsthe Lucene query consistency checkerthe prettify for pretty printing