Find similar ... inside

Post Reply
roberto_george
Posts: 13
Joined: Fri Jun 08, 2001 1:54 pm

Find similar ... inside

Post by roberto_george »

Can you explain me how "Find Similar" function from your standard search script works ?
I want to use the same functionality in one of my custom scripts and I didn't understand what are the diferences betwen a standard search and "Find Similar" ("More like this" in your script) function.

Thank you !
User avatar
mark
Site Admin
Posts: 5515
Joined: Tue Apr 25, 2000 6:56 pm

Find similar ... inside

Post by mark »

Looking at the script you'll find the <a name=mlt> function which sets up the similarity query then performs the search. The similarity query is generated by doing texttomm() on the content of the selected page.
roberto_george
Posts: 13
Joined: Fri Jun 08, 2001 1:54 pm

Find similar ... inside

Post by roberto_george »

ok .. i found the function but i didn't get it how your main script call this function .. same problem I have with "<A NAME=links>".
User avatar
mark
Site Admin
Posts: 5515
Joined: Tue Apr 25, 2000 6:56 pm

Find similar ... inside

Post by mark »

It doesn't. "mlt" is an external entry point. See the "Find Similar" url.
roberto_george
Posts: 13
Joined: Fri Jun 08, 2001 1:54 pm

Find similar ... inside

Post by roberto_george »

Then the value for the "cmd" parameter in an url act as an entry point in your script.

First: Maybe I'm wrong but I don't remember seeing anything like this in manual. Anyway I will check again.

Second: This is not a security issue ?

Third: This means that all I have to do is just replace the SQL select from my script with the one that is in your mlt function (addapted first .. of course). I will try this approach.

Thank you for your answer.
User avatar
mark
Site Admin
Posts: 5515
Joined: Tue Apr 25, 2000 6:56 pm

Find similar ... inside

Post by mark »

Post Reply