L
Lyndon Samson
All this fidding with bits in the Thread "How to get non-unique
elements from an array" got me digressing to search engines and
indexing.
So if you have for example
Doc1=3DThe quick brown fox
Doc2=3DJumped over the brown dog
Doc3=3DCut him to the quick
You can build a table with bit number and word.
1 the
2 quick
3 brown
4 fox
5 jumped
6 over
7 dog
8 cut
9 him
10 to
11 quick
To create indices
Doc1=3D00000001111
Doc2=3D00001110101
Doc3=3D11110000011
You can very quickly return the Docs that contain 'the' [
Doc1,Doc2,Doc3 ], or brown [ Doc1,Doc2 ] etc.
The rubyquiz idea would be to write a simple indexer/query system.
elements from an array" got me digressing to search engines and
indexing.
So if you have for example
Doc1=3DThe quick brown fox
Doc2=3DJumped over the brown dog
Doc3=3DCut him to the quick
You can build a table with bit number and word.
1 the
2 quick
3 brown
4 fox
5 jumped
6 over
7 dog
8 cut
9 him
10 to
11 quick
To create indices
Doc1=3D00000001111
Doc2=3D00001110101
Doc3=3D11110000011
You can very quickly return the Docs that contain 'the' [
Doc1,Doc2,Doc3 ], or brown [ Doc1,Doc2 ] etc.
The rubyquiz idea would be to write a simple indexer/query system.