Ponharish / pe

0 stars 0 forks source link

Similarity between `find` and `filter` #8

Open Ponharish opened 1 week ago

Ponharish commented 1 week ago

The find and filter commands seem to do a similar job with minor differences. The need for having two different commands is not justified.

Moreover, when using the filter command, I can provide partial information only for the name field but have to specify the exact details for the other fields. Hence this seems to add very little value when the find function already exists.

soc-pe-bot commented 1 week ago

Team's Response

The design of the find and filter commands addresses different use cases, and their inclusion is intentional to provide users with flexibility in managing contacts efficiently.

  1. Distinct Purpose of Commands:

    • find Command: This is a quick and simple search tool for identifying contacts based on one field (e.g., name). It is designed for scenarios where users want to locate a contact using minimal information.
    • filter Command: This provides advanced filtering capabilities by allowing users to search based on multiple fields simultaneously (e.g., name, email, phone, or address). It is tailored for cases where users need to refine their search results more precisely, such as narrowing down a contact list for a specific event or task.
  2. Exact Matching vs. Partial Matching:

    • The partial match functionality in the filter command for names complements the broader search provided by find. While the other fields in filter require exact matches, this distinction helps ensure the command retrieves specific, relevant results without ambiguity. Partial matches for all fields might lead to overwhelming or irrelevant results.
  3. Value Addition of filter:

    • The filter command allows users to combine criteria across multiple fields (e.g., find a contact with a specific phone number and email). This is functionality that the find command cannot offer and is useful in complex scenarios where a single criterion is insufficient.
  4. Justification for Separate Commands:

    • Having two commands serves different user needs:
      • Users seeking simplicity can rely on find.
      • Users needing more granular control can use filter. Combining these two into a single command would complicate the syntax and user experience, making the app less intuitive.

Also this is mentioned in the FAQ section of the User Guide as well

image.png

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: I agree that the filter command can search for names with partial matches, and the find command is meant for quick information retrieval. However, the distinction between the two commands is still not clear.

When using fields such as email and phone number with the filter command, it performs an exact match, which aligns with the behavior of the find command.

For example, A particular user might prefer searching with name while someone else would want to search with their phone number. Since the user has to now use two different commands, it brings in more complexity and conflicts with the following,

Users seeking simplicity can rely on find

This may confuse users when trying to search for a contact and may cause inconvenience occasionally.


## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]