First sort the keyword set and assign bits to each keyword. For example,
0 bit -> home
1 bit -> based
2 bit-> free
3 bit -> jobs/job
...
Now tokenize each line. For every token, compare it with keywords in the keyword set to create an integer value. For example:
"30234810 home based accounting jobs"
matches 0, 1 and 3 bits. So the integer is 0x0b.
Each query creates an integer. Calculate the bit-operator 'and' using the query integer and the line result. If the result is 1, it matches, otherwise not.
0 bit -> home
1 bit -> based
2 bit-> free
3 bit -> jobs/job
...
Now tokenize each line. For every token, compare it with keywords in the keyword set to create an integer value. For example:
"30234810 home based accounting jobs"
matches 0, 1 and 3 bits. So the integer is 0x0b.
Each query creates an integer. Calculate the bit-operator 'and' using the query integer and the line result. If the result is 1, it matches, otherwise not.