nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Similarity between `find` and `filter` #2527

Open nus-pe-bot opened 1 week ago

nus-pe-bot 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.


[original: nus-cs2103-AY2425S1/pe-interim#3445] [original labels: severity.Medium type.DocumentationBug]

VedJoshi commented 6 days 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

Duplicate status (if any):

--