Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
hi all,

i understand this may not be a direct ios question but it is related to.

i am developing an application in ios sqlite where i ned to search a db with records ordered by o of words found in the search string.

for example if the search string "x y" strings containing x y will appear first, then strings containing x and then y.

the question is is there a straight sql query to do this ? or i need to write my own function ?

regards
ch
 
I thought somebody will come up with a query that works :) , is it possible with only sql or i need to write logic with obj c and sql ?
 
I thought somebody will come up with a query that works :) , is it possible with only sql or i need to write logic with obj c and sql ?

I don't have much experience with it, but this is probably a good place to start reading:
http://www.sqlite.org/fts3.html#section_1_4

Full-text search in SQL differs between implementations (i.e. MySQL, SQLite, MSSQL, etc), so you should be looking for examples specific to the implementation you're using. I have very limited experience with search, hence the vague response. Sorry I couldn't be more help.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.