views:

54

answers:

3

I have asked several questions about Zend and its search functions. Now after further reading I have noticed that it requires FULL-TEXT indexes in the MySQL fields. My webhosting provider doesn't allow me to change anything in the my.ini (my.cnf) file, which holds information about minimum length of word to search full-text indexes and more. So I can't use FULL-TEXT if there is no other way of setting configuration than changing in that file. Examples of changes are the ft_min_word_len which is by default 4 I think.

I have a table with around 400,000 records, and I need a good search function. It's classifieds btw.

There has to be a way, I just don't know it, so I thought maybe you guys would know.

In the first question I asked regarding Zend I also mentioned I don't have FULLTEXT support, but people suggested Zend anyway.

Can somebody please give me a good explanation of what I should do in my situation? NOTE: My website is PHP based!

PS: 'LIKE' wont suffice in the searches I need to make. It must be pretty advanced. If you need details about what it should consist of, check my previous Q: http://stackoverflow.com/questions/1932697/which-third-party-search-engine-free-should-i-use

Thanks

UPDATE: In two articles, it says Zend "does full-text searches". What do they mean by that? I believe they mean I require full-text indexes!?

+3  A: 

Zend_Search in no way requires any full-text searching to be enabled on any database. In fact, Zend_Search is totally independent of any database, as it is a implementation of the Lucene search engine totally in PHP. You should therefore be able to customize it however you wish.

Full text searching is simply the method it uses. So it does do full text searches, but doens't use your database settings (or your database at all)

EDIT
In response to the third comment, Yes, it is in effect a database, but I wouldn't use it as a replacement to a 'true' database as it doesn't have the fields and data integrity support. You can use the UnStored field type so that it only indexes the records, but doesn't store the actual text, so that you can use it in combination with a relational database.

Yacoby
Then why does it say in two articles I read that it 'does full-text searches'
Camran
Because it does roughly the same as a MySQL full text search (except it is probably a better implementation) It just doesn't use your database and is totally PHP based.
Yacoby
okay, so how would I then search my db of records, if it doesn't use my database? You mean Zend is a database on its own?
Camran
ok, good response... last, do you have any article or tutorial you know of on how to setup Zend with my PHP website, and to integrate the mysql records somehow? (Right now I have no clue)
Camran
A: 

Are you sure that Zend_Search_Lucence requires a fulltext index on your data ? I don't see why it would -- even if I never used it.

This component allows you to do "fulltext searches", but it doesn't mean it uses any fulltext index from the database : it can implement its own fulltext mecanism.
(And, as a matter of facts, it does)


Still, with a database that big (you said you have several hundreds of thousands of records), I would probably change hosting service, getting one that allows me to do whatever I want with my server, includind changing the configuration of MySQL, and installing other software, like Solr or Sphinx.

Maybe it'll cost a bit more (but a dedicated server is not that costly either), but, at least, you'll be able to do what you need with your server...

Pascal MARTIN
I know, I am on to it already, this is just temporary!
Camran
@camran : OK :-) Thanks for the precision.
Pascal MARTIN
A: 

Using full-text indexes is a bad idea anyway; they're not very good for making a useful search; they only work with MyISAM; they don't scale to big data very well.

Lucene does not use them, nor does any sensible mysql-based app (Sadly bugs.mysql.com does)

MarkR