fulltext vs 'normal'<

liunx

Guest
Hey peeps,

I've been contemplating tring to write a search class as part of a CMS I'm working on,and I'd like some oppinions :)


First,what are the advantages/disadvantages to using so called 'fulltext' searching as opposed to standard searching?

Second,in regards to complexity...aproximately how much more complex would a fulltext search class be as opposed to a more simple search approach?

Third, is there any reason you'd specifically recommend or not recommend 'fulltext' searching for multiple types of table structures/contents?(for example,you of course have standard news posts,forum posts,articles...but you also have for example image gallery descriptions and such)... the point I'm tring to make is,the structures have some similar parts,but they are in no way identical or even semi-identical.

And...lastly, what kind of performance difference would I be looking at?I don't want to implement anything that would cause an extreme increase in loading times...altho...I could cache the results could I not?



tia :)Originally posted by willamoose
Hey peeps,

I've been contemplating tring to write a search class as part of a CMS I'm working on,and I'd like some oppinions :)


First,what are the advantages/disadvantages to using so called 'fulltext' searching as opposed to standard searching?

Second,in regards to complexity...aproximately how much more complex would a fulltext search class be as opposed to a more simple search approach?
now I may be going up the wrong tree here but fulltext has nothign to do with php. you set the database tables to fulltext and leave it. but you can only do this on 3.23.+ and only on some columns. I think it can only be on varchar, char,text fields. so just write your class on how you want to search. I just got done doing one and it took me 2 months, and I didn't use a class. mine is pretty complex, it can search whole words, partial words and this word but NOT that word. things like that. do you want the user to be able to use AND, OR or AND NOT and any other boolean search?

Originally posted by willamoose
Third, is there any reason you'd specifically recommend or not recommend 'fulltext' searching for multiple types of table structures/contents?(for example,you of course have standard news posts,forum posts,articles...but you also have for example image gallery descriptions and such)... the point I'm tring to make is,the structures have some similar parts,but they are in no way identical or even semi-identical.
fulltext is suppose to be faster so it should be a no brainer. you also have indexing as well.

Originally posted by willamoose
And...lastly, what kind of performance difference would I be looking at?I don't want to implement anything that would cause an extreme increase in loading times...altho...I could cache the results could I not?

tia :)
just amke sure you index and use fulltext whenever possible. also depends on what field types you are searching.Originally posted by scoutt
now I may be going up the wrong tree here but fulltext has nothign to do with php. you set the database tables to fulltext and leave it. but you can only do this on 3.23.+ and only on some columns. I think it can only be on varchar, char,text fields. so just write your class on how you want to search. I just got done doing one and it took me 2 months, and I didn't use a class. mine is pretty complex, it can search whole words, partial words and this word but NOT that word. things like that. do you want the user to be able to use AND, OR or AND NOT and any other boolean search?


fulltext is suppose to be faster so it should be a no brainer. you also have indexing as well.


just amke sure you index and use fulltext whenever possible. also depends on what field types you are searching.

Well...as far as boolean searches not really...all I basically wanted was to either include ALL of the words or ANY of the words,and the only fields I wanted to search are varchar and text types.The scenario is the CMS will be used for content based sites(namely an anime site and a fanfiction[story/creative writing] site) and I wanted to allow the visitor to search the contents and/or titles of the articles. I wasn't looking for anything really as far as relevancy or such...just to be able to search for a whole string or any of the words in the string. So fairly simple searching as far as that goes,definately nothing close to as complex as your method.


Er...I kinda misphrased my post..I knew fulltext was to do with the mysql backend and not php itself...I shouldeve said a class that will work with the already fulltext'd columns :)the code isn't any different when you search fulltext or normal.

the queries will be different depending on how you want to search. but just make the fields fulltext and you will be done with that. the code will be normal php, nothing special.Originally posted by scoutt
the code isn't any different when you search fulltext or normal.

the queries will be different depending on how you want to search. but just make the fields fulltext and you will be done with that. the code will be normal php, nothing special.

ah I see...shows how much research I did into searching previous to making this post eh?:P


Thanks A lot scoutt...I think I got an idea of where to go from here. Again and again...you never cease to assist ^_^
 
Back
Top