Skip to content

Array access method on Synonyms class don't work #22

Open
@joachim-n

Description

Description

The array access methods such as offsetExists() on the Synonyms class don't work as expected.

Steps to reproduce

If I get the Synonyms object for a collection and call retrieve() on it, the result is an array whose 'synonyms' key shows I have a number of synonyms. Each synonym array has the root, ID, and synonym words.

However, if I do isset($my_synonyms[$id])) with one of the IDs, I get FALSE.

This appears to be because $this->synonyms is never populated with data from the API call.

Expected Behavior

Array access method should reflect the actual data.

Actual Behavior

Always returns FALSE.

Metadata

Typsense Version: v4.7.0

OS: MacOS

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions