You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Query Translation if where the qpl query, agnostic to this point, gets converted into an engine specific query

Translators Available

  • ElasticsearchTranslator (from version 1.0.0)
  • OpensearchTranslator (from version 1.0.4)

Translation

All the translators are located in the pakage pyqpl.translator currently, import the require one

from pyqpl.translator import ElasticsearchTranslator


Create an instante of the translator 

translator = ElasticsearchTranslator()


And translate the qpl_query with the translator instance, is the same call for all translators

engine_query = translator.to_engine_query(qpl_query)


The query produced by the translator is already for the search engine

  • No labels