Jump to content

PHP with database searching


kdsxchris

Recommended Posts

I'm having a little trouble with approaching a database searching problem. Lets say I have a database abstraction layer that I plan to work with Mysql, Sqlite, Access, Oracle, etc. In addition, I need to search through the TEXT fields. These records could be huge, like posts you might see on a forums board. What is the best way to design a solution that will let me search (the most efficient way) through huge text records, but might be in mysql, sqlite, etc?

 

I have a sql class that lets me do queries and takes into account for differences between some database systems (like with "limit" and "like"). I could create a function that would return a link to a resource with the records. How different are major database sytems with indexing the text fields?

Link to comment
Share on other sites

  • 2 weeks later...

Searching large text fields in a big database may take up huge resources and have come across this many times.

In MYSQL you can create a fulltext index.

 

I would prefer to remove the search from the databases entirely and use something like Lucene. You can update your lucene search indexes when new records get added into whatever database.

 

http://lucene.apache.org/java/docs/

 

I think that the Zend framework also supports this

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.