Forum Moderators: coopster

Message Too Old, No Replies

Search Relevance without MYSQL

pull multi datasources from webservices then search for phrase

         

beactive

8:30 am on Mar 27, 2005 (gmt 0)

10+ Year Member



Situation: I am pulling data from various webservices and storing these into a temporary array. This way I can combine all the sorces. The array is multi dimensional with about 100 records and each records has 3 dimensions.
$data[0][0]
$data[0][1]
$data[0][2]

$data[1][0]
$data[1][1]
$data[1][2]

I then need to search the array for certain string phrases and then sort by relevance. I need to give more importance to dimension 0 then 1 then 2. I know how to do this in MYSQL but I do not need to keep the data so I do not want to insert the data, then do a fulltext search for the results then dump the data - This will take too much time.

Is there a way to search by relevance using an array?

coopster

3:08 pm on Mar 27, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, beactive.

Perhaps array_keys() [php.net] with the optional search_value parameter specified will work for you.