Page 1 of 1
Find similar ... inside
Posted: Thu Oct 25, 2001 5:47 pm
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 !
Find similar ... inside
Posted: Thu Oct 25, 2001 6:05 pm
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.
Find similar ... inside
Posted: Fri Oct 26, 2001 1:38 pm
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>".
Find similar ... inside
Posted: Fri Oct 26, 2001 1:55 pm
by mark
It doesn't. "mlt" is an external entry point. See the "Find Similar" url.
Find similar ... inside
Posted: Fri Oct 26, 2001 2:19 pm
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.
Find similar ... inside
Posted: Fri Oct 26, 2001 2:45 pm
by mark
1:
http://www.thunderstone.com/site/vortexman/node61.html
2: not for the default search script. if a given script is concerned about security it should use public and private on functions as needed.
http://www.thunderstone.com/site/vortexman/node21.html
3: pretty much