diff --git a/docs/_ug/commands/ItemCommands.md b/docs/_ug/commands/ItemCommands.md index 62081b8a963..aa1c1da979a 100644 --- a/docs/_ug/commands/ItemCommands.md +++ b/docs/_ug/commands/ItemCommands.md @@ -86,13 +86,11 @@ Item List Box: **Format:** `find KEYWORD [KEYWORDS]...` -> Finds all items in FoodRem whose names contain any of the specified keywords - +> Finds all items in FoodRem whose names contain substrings of the KEYWORDS ```info * The notation `[KEYWORDS]...` means that we can take in multiple keywords. In this case, at least one `KEYWORD` is required. * The `KEYWORDS` are case-insensitive. (e.g. "apples" will match "Apples"). -* The order of the `KEYWORDS` do not matter (e.g "rose apple" will match "apple rose"). -* The result will be items in which `ITEM_NAME` contain any one of the `KEYWORDS` provided. +* The result will be items in which any of the words in `ITEM_NAME` contains a substring of the `KEYWORDS`. (e.g. "c e" will match "Carrot Cake", "cereal", "Cold Escargo" and "eclairs") ``` ```tip diff --git a/src/main/java/seedu/foodrem/commons/enums/CommandType.java b/src/main/java/seedu/foodrem/commons/enums/CommandType.java index c9175ca594d..a6878c2e20f 100644 --- a/src/main/java/seedu/foodrem/commons/enums/CommandType.java +++ b/src/main/java/seedu/foodrem/commons/enums/CommandType.java @@ -106,8 +106,8 @@ public String getUsage() { FIND_COMMAND("find") { @Override public String getUsage() { - return getCommandWord() + ": Finds all items in FoodRem whose names contain any of " - + "the specified keywords (case-insensitive).\n\n" + return getCommandWord() + ": Finds all items in FoodRem whose names contain substrings of any of " + + "the KEYWORDS (case-insensitive).\n\n" + "Format:\n" + getCommandWord() + " KEYWORD [KEYWORDS]...\n\n" + "Examples:\n"