Subversion Repositories wimsdev

Compare Revisions

Ignore whitespace Rev 6462 → Rev 6463

/trunk/wims/public_html/modules/home/search.C/search.S
1,5 → 1,5
!!##sheet
basedir=bases/sheet/index
!!##class
basedir=bases/class
!if $srch!=$empty
suffix_dictionary=
dictionary=$basedir/$search_lang
22,6 → 22,7
!for i=1 to $scnt
l_=!line $i of $sout
t_=!wordcnt $l_
!advance gotcnt
!if $t_=2
!distribute word $l_ into m_,w_
!if $m_=$lastmod or $gotcnt>$gotlim
35,6 → 36,8
lastmod=$m_
weight=$w_
!endif
!else
gotm=$gotm $l_
!endif
!next i
!if $lastmod!=$empty
44,30 → 47,12
!endif
 
translator_switch=leaveline
!if $gotcnt=0
gottype=popular
!else
gottype=search
gotw=!words2lines $gotw
gotm=!words2lines $gotm
dictionary=$basedir/weight.$search_lang
gotW=!exec translator $gotm
w_=
!for i=1 to $gotcnt
u_=!line $i of $gotw
v_=!line $i of $gotW
w_=!append line $[round(100*($u_+1)/($v_+1)^0.7)] to $w_
!next i
gotw=!sort reverse numeric lines $w_
gotm=!line $wims_sort_order of $gotm
!endif
 
dictionary=$basedir/title.$search_lang
dictionary=$basedir/title
gott=!exec translator $gotm
dictionary=$basedir/description.$search_lang
dictionary=$basedir/description
gotd=!exec translator $gotm
!if $gotcnt>0 and / notin $gotm
dictionary=$basedir/addr.$search_lang
dictionary=$basedir/addr
gotm=!exec translator $gotm
!endif