algolia / algolia/algoliasearch-client-python

KeyError: 'facets'

Open
#579 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
207
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Sometimes I get a key error on `facets`, I could not reproduce it. I am wondering if this is something normal and if you know in what condition it could happen ?

```python
results = index.search("", {"facets": "*"})
facets = results['facets'] # <== sometimes the key is not present
```

Contributor guide

Open the contributing guide

Research direction

Start with the `index.search("", {"facets": "*"})` example and inspect how the Python client constructs and returns search results. Reproduce the missing `facets` key if possible, then identify and document the condition or behavior that explains it and add an appropriate regression check if the repository provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.