1

In StackOverflow, while I type, I get suggestions of questions that may be of interest to me.

I would like to reproduce this feature on another site. My questions are in a AWS RDS MySQL InnoDB Database. My site is in PHP (Yii, running on AWS Elastic Beanstalk).

Would I be better off to use MySQL directly? Lucene? AWS CloudSearch? ElasticSearch? Or some other technology I don't know about?

(I'm not worried about the client-side, jQuery UI or other tricks will work fine).

Since I may one day want to create a full blown search engine, I thought maybe CloudSearch is a good idea. But maybe it's overkill for what I'm trying to do?

Nathan H
  • 48,033
  • 60
  • 165
  • 247
  • possible duplicate of [How to build a 'related questions' engine?](http://stackoverflow.com/questions/2182671/how-to-build-a-related-questions-engine) – Don Branson Mar 30 '14 at 19:38

1 Answers1

-1

I would use a JavaScript (jQuery) solution that queries after each character typed and searches for questions alike. You'll find out that, in the first stage, the technique not really matters. When building your full blown search engine, you could decide to use an index like CloudSearch.

Emile
  • 153
  • 4
  • 1
    You are talking about the client-side. I was already planning to use jQuery for this. My question is about the server-side. jQuery will be sending ajax requests - the server needs a response fast. – Nathan H Aug 02 '13 at 13:46
  • Ah; didn't realize that. I would go for MySQL in combination with caching (MemCache for example); make sure you have an index on the column you're comparing (I guess that's your 'question' column). You could either cache the query output directly (most frameworks support something like that) or hold a cache of every input with the suggested questions. – Emile Aug 02 '13 at 13:59
  • But how can I do such a search on MySQL? I don't think MySQL alone is good enough to do a semantic search no? I can do things like string LIKE "%blabla%" but not relevance. Just look at the "related" questions that StackOverflow suggest. It's much more complex than a simple mysql query... – Nathan H Aug 02 '13 at 14:12