I have a text file say, testFile.txt
and an array of strings to be searched in the file as say, ['year', 'weather', 'USD 34235.00', 'sportsman', 'ಕನ್ನಡ']
. I can break the file into tokens with NodeJS natural and maybe, create a large array (~100-200x the number of entries in the string array) out of it. Then, sort both the arrays and start the search. Or, use lodash
directly?
A Found
result is when at least one string from the search string array is found in the text file; else, it should be considered as NotFound
.
What are some of the options to implement such a search?