elasticsearch-dsl

How do I use the Elasticsearch Query DSL to query an API using Python?

How do I use the Elasticsearch Query DSL to query an API using Python? Question: I’m trying to query the public Art Institute of Chicago API to only show me results that match certain criteria. For example: classification_title = "painting" colorfulness <= 13 material_titles includes "paper (fiber product)" The API documentation states: Behind the scenes, …

Total answers: 1

elasticsearch-dsl in python: How can I return the "inner hits" for my query?

elasticsearch-dsl in python: How can I return the "inner hits" for my query? Question: I am currently exploring elasticsearch in python using the elasticsearch_dsl library. I am aware that my Elasticsearch knowledge is currently limited. I have created a model like so: class Post(InnerDoc): text = Text() id = Integer() class User(Document): name = Text() …

Total answers: 1

"Failed to establish a new connection" when trying to access Elasticsearch Cloud with elasticsearch-dsl Python package

"Failed to establish a new connection" when trying to access Elasticsearch Cloud with elasticsearch-dsl Python package Question: I’m experimenting with Elasticsearch and indexing some Django data using the elasticsearch-dsl Python package. I have created a relatively basic test, search.py, but receive a connection error when I try to index any data. from elasticsearch_dsl.connections import connections …

Total answers: 2

Using shingles and fuzziness in Elasticsearch Python DSL?

Using shingles and fuzziness in Elasticsearch Python DSL? Question: How do you call shingles in Python DSL? This is a simple example that searches for a phrase in the “name” field and another one in the “surname” field. import json from elasticsearch import Elasticsearch from elasticsearch_dsl import Search, Q def make_dsl_query(fields): “”” Construct a query …

Total answers: 2