Skip to content

Why was the Haystack read Op split into get_entity and find_entity? #111

@jdechalendar

Description

@jdechalendar

This is not an issue per se, but I am curious as to pyhaystack's design choices on this. Apologies if there was another place you would have preferred me to ask this question.

The "Operation basics" section of the pyhaystack documentation closely matches the Haystack docs for the about and nav operations, which makes it easy to understand what pyhaystack is doing. But the functionality for the read Op seems to have been split into get_entity and find_entity methods, that use the by id and by filter options for the read Op, respectively. Bringing this up because this was initially very confusing to me.

Is there a reason you chose not to implement

HaystackSession.read(ids=None filter=None, limit=None, **kwargs)

but instead

HaystackSession.get_entity(ids, refresh=False, single=None, callback=None)

and

HaystackSession.find_entity(filter_expr, limit=None, single=False, callback=None)

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions