You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most file systems currently deployed help the end user search the contents of files in a directory. Keywork search is a major subdomain of computer science precisely because software developers are interested in making fast and reliable searches on content. Some companies have built their entire company on quick and accurate file content search. Data storage, manipulation, and retrieval are arguably the only reasons people use computers! We already have storage down, and manipulation would be handled with edit functionality.
We should work on retrieval.
Changes
Current implementations of the note-taking app specifications do search in different ways. Most projects can list the files in a directory. Some of them have manually designed headers to store modification date metadata. Headers are combed when searching, or a backend is built to store a database of changes that are combed. Lastly only search_by_filename requires the exact filename to be known.
Regular Expressions
search_by_filename and search_by_content should support regular expression matching. The user should be able to provide a --re flag and the search term is interpreted as a regular expression.
Fuzzy Matching
search_by_filename and search_by_content should support an optional --fuzzy that does fuzzy matching to the input string.
search_by_content
This function should work similarly to search_by_filename. We should display the number of matches, and then a list. Items of the list should be filenames followed by the lines immediately before, including, immediately after the search match.
The text was updated successfully, but these errors were encountered:
Reasoning
Most file systems currently deployed help the end user search the contents of files in a directory. Keywork search is a major subdomain of computer science precisely because software developers are interested in making fast and reliable searches on content. Some companies have built their entire company on quick and accurate file content search. Data storage, manipulation, and retrieval are arguably the only reasons people use computers! We already have storage down, and manipulation would be handled with
edit
functionality.We should work on retrieval.
Changes
Current implementations of the
note-taking app
specifications do search in different ways. Most projects can list the files in a directory. Some of them have manually designed headers to store modification date metadata. Headers are combed when searching, or a backend is built to store a database of changes that are combed. Lastly onlysearch_by_filename
requires the exact filename to be known.Regular Expressions
search_by_filename
andsearch_by_content
should support regular expression matching. The user should be able to provide a--re
flag and the search term is interpreted as a regular expression.Fuzzy Matching
search_by_filename
andsearch_by_content
should support an optional--fuzzy
that does fuzzy matching to the input string.search_by_content
This function should work similarly to
search_by_filename
. We should display the number of matches, and then a list. Items of the list should be filenames followed by the lines immediately before, including, immediately after the search match.The text was updated successfully, but these errors were encountered: