Mailing List Archive

Lucene or Sphinx? I want to search within +200,000 record tables
Hi.

I created a website with two +200,000 record tables cointaining
information about:

Table 'items'
- id
- title
- text
- tags
- date
- rate
- user_id

Table 'comments'
- id
- item_id
- title
- text
- date
- user_id

And I would like to search within them. I created some MySQL queries
but they are v-e-r-y
s-l-o-w. So I'm trying to find another solution and I'm considering
Lucene or Sphinx.

As far as I'm concerned, Lucene would crawl and index webpages and
Sphinx would build an
index over the table, right? Which could be the best solution in your opinion?

Thank you very much.
Re: Lucene or Sphinx? I want to search within +200,000 record tables [ In reply to ]
Lucene doesn't know about DBs, it just knows Documents. It would be
your responsibility to convert your records to Documents. It's pretty
straightforward to do. You might want to check Solr which will take
care of a lot of the infrastructure people build around Lucene; it
even has a patch for talking to DBs
https://issues.apache.org/jira/browse/SOLR-103 and slurping records.

I can't speak to Sphinx, as I haven't used it.

-Grant

On Jan 4, 2008, at 8:32 AM, thomas Armstrong wrote:

> Hi.
>
> I created a website with two +200,000 record tables cointaining
> information about:
>
> Table 'items'
> - id
> - title
> - text
> - tags
> - date
> - rate
> - user_id
>
> Table 'comments'
> - id
> - item_id
> - title
> - text
> - date
> - user_id
>
> And I would like to search within them. I created some MySQL queries
> but they are v-e-r-y
> s-l-o-w. So I'm trying to find another solution and I'm considering
> Lucene or Sphinx.
>
> As far as I'm concerned, Lucene would crawl and index webpages and
> Sphinx would build an
> index over the table, right? Which could be the best solution in
> your opinion?
>
> Thank you very much.

--------------------------
Grant Ingersoll
http://lucene.grantingersoll.com
http://www.lucenebootcamp.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ