question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search returning Document

See original GitHub issue

Given a Doc that is a Document, I expected Doc.search()... to return Docs rather than generic Hits, but this doesn’t seem to be the case. My goal is to dump a list of returned documents as JSON, and I would like to filter empty fields, just like doc.to_dict().

Is there a way to get the same behavior from Hit.to_dict() as Document.to_dict()? Is there a way to convert search responses into documents? Is there a more natural way to return search results as JSON, while filtering empty fields (including in nested documents)?

(This may all be related to #926. It’s possible that I’ve misconfigured doc_type.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
honzakralcommented, Jun 25, 2019
2reactions
NielkScommented, Feb 10, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

ElasticSearch returns document in search but not in GET
This issue typically occurs when documents are indexed with non-default routing (either explicitly set or deducted from parent's id in case ...
Read more >
How To Return All Documents From An Index In Elasticsearch
How To Return All Documents From An Index In Elasticsearch ... Use this option to search for all documents with the "nice" tag...
Read more >
Search your data | Elasticsearch Guide [8.5] | Elastic
Documents that match a search's queries are returned in the hits, or search results, of the response. A search may also contain additional...
Read more >
Simple Full-Text Search with ElasticSearch - Baeldung
Full-text search queries and performs linguistic searches against documents. It includes single or multiple words or phrases and returns ...
Read more >
Search Documents (Azure Cognitive Search REST API)
Query an Azure Cognitive Search index and return search results.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found