views:

73

answers:

2

I was a heavy user in Sphinx and Lucene. Sphinx just takes a database, indexes it. And you call Sphinx to get the ID's.

But what if I want to create a search engine that's very tiny. Just a few rows of data and a few paragraphs of words? The trick is, the rows of data is constantly changing. So, I can't have an "index".

I want to be able to rank by relevancy, just like Sphinx. How can I do that? Of course, I wouldn't go through the indexing...

A: 

Of course, I wouldn't go through the indexing...

How are you going to determine the relevancy without looking at everything?

If there is only a tiny bit of data, and it's changing so much that maintaining an index is impractical, you could instead generate the index whenever you want to search the data, query it, and then drop the index the next time the data changes. With a small data set, frequent updates, and infrequent lookups, this could be more efficient than maintaining the index.

Anon.
+1  A: 

If you only have a few rows of data and a few paragraphs of words in each, keep it all in memory and use whatever text algorithm makes the most sense for your content.

Mike Buckbee