result_similar error

Post Reply
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

result_similar error

Post by KMandalia »

When I enter a query term and click on similar pages link from any record on the first page, the next page has relevance % going as high as 133%. Is this a bug or something is wrong on my part. I just added the <result_similar> function call at the bottom of the result record.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

result_similar error

Post by mark »

Never seen that before. Try an unmodified search script to see if the same thing happens when you click find similar.

When you say at the "bottom of the result record" where in the script do you mean?
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

result_similar error

Post by KMandalia »

right next to the url (in similar fashion to what google, yahoo etc. does)
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

result_similar error

Post by mark »

That's where on the page. I wanted to know where in the script.

Does "find similar" in an unmodified (except for your removal of Keywords of course) script work?
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

result_similar error

Post by KMandalia »

Yes, it works with original script. I have reverted my changes (No keyword removal in sql)

This is from the original search script:

<a name=result_similar_url export>
<capture><local p><vxcp htmlmode off><$p=$ret>$url$urlq&cmd=mlt&id=$id<vxcp htmlmode $p></capture>
</a>
<a name=result_similar text="Find Similar" class="">
<result_similar_url><a href="$ret"$class>$text</a><!--nop-->
</a>

This is from my modified script:

<!-- display "more like this" link for a result record -->
<a name=result_similar_url export>
<capture><local p><vxcp htmlmode off><$p=$ret>$url$urlq&cmd=mlt&id=$id<vxcp htmlmode $p></capture>
</a>

<a name=result_similar text="Similar Pages" class="">
<result_similar_url><a href="$ret"$class>$text</a><!--nop-->
</a>

I am calling <result_similar> in result2 function.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

result_similar error

Post by mark »

I tried that. Can't replicate the errors you're seeing. Is there a url where I can try yours? And maybe show your complete result2 function so I can see how you modified that.

Also, there's no need to modify result_similar. Just put the desired text in the call to it
<result_similar text="Similar Pages">
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

result_similar error

Post by KMandalia »

Also, there's no need to modify result_similar. Just put the desired text in the call to it
<result_similar text="Similar Pages">

--It's working now after I did what you said. Strange!

Thanks.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

result_similar error

Post by KMandalia »

http://search.creditunions.com

type in 'indirect lending' and on the first result record, click on 'similar pages'. The no. of results returned is 10 times more and the same record has the relevance of 97%, up from 78%.

While I don't really have a problem with it. I want to know what exactly 'Similar pages' does. Throughout the message board I couldn't find how it works exactly and the manual have a very vague description.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

result_similar error

Post by mark »

Similar pages finds pages in the database that have content similar to the one you click on, without respect to the user typed query. Therefore it would be normal to expect the page to be very similar to itself. It finds the similar pages by massaging the text of the page into a query with many terms and performing that search. Note the "texttomm" call in the mlt function.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

result_similar error

Post by KMandalia »

I ultimately took it out, since it made no sense whatsoever. Also, the only query word causing the 133% relevance was 'Callahan' (that is the name of our firm, it shows up 1000 times and clicking on similar pages brings 18000 pages). No other term I tried caused the relevance to go beyond 100%. Strange again!
Post Reply