%%macro cs_datectrl%% %%endmacro%% %%macro search_mappings%% %%lrc esDlgTxt8 sear "In Attributes"%%: %%while extended.search.customindex.next_entry%% %%endwhile%%
Title
Name
Keyword
%%extended.search.customindex.entry.attribute%%
%%endmacro%% %%macro inContents%% %%lrc esDlgTxt2 sear "In contents"%%: %%if hyper.ftserver.searchengine.name =="verity" %% %%else%%%%#searchengine is verity%% %%endif%%%%#searchengine is native%%
%%lrc esDlgTxt3 sear "Full Text Search using the following options for each word"%%
 
%%lrc esDlgTxt4 sear "Thesaurus (search for synonyms)"%%
%%lrc esDlgTxt16 sear "Variations (find expression in singular, plural or declined)"%%
%%lrc esDlgTxt5 sear "Sounds like (find words with similar pronunciation"%%)


Case sensitive (%%lrc esDlgTxt6 sear "Distinct capital and small letters"%%)
%%lrc esDlgDes2 sear "(cannot be used together with variations, thesaurus and sounds like)"%%
%%lrc esDlgTxt7 sear "Full Text Search"%%

%%if hyper.ftserver.searchengine.name =="verity" %% %%lrc esDlgTxt18 sear "In XML tag"%%: %%endif%% %%endmacro%% %%macro created_modified%% %%lrc esDlgTxt9 sear "Created"%%: %%lrc esDlgTxt10 sear "after"%% DateControl({FormElement:"timeca",Mode:"dr"}); %%lrc esDlgTxt11 sear "before"%% DateControl({FormElement:"timecb",Mode:"dr"}); %%lrc esDlgTxt12 sear "Modified"%%: %%lrc esDlgTxt10 sear "after"%% DateControl({FormElement:"timema",Mode:"dr"}); %%lrc esDlgTxt11 sear "before"%% DateControl({FormElement:"timemb",Mode:"dr"});   write(lrc("esDlgDes3","sear",{absdate:HW_UI_Date.date,reldate:"-4days"},"(enter date in format %absdate% or as relative date e.g. %reldate%)")) %%endmacro%% %%macro search_languages%% %%lrc esDlgTxt13 sear "Language"%%: %%languageoptions_check%%  %%lrc esDlgTxt14 sear "exclude documents containing one of the following words"%% %%lrc esDlgTxt17 sear "Exclude"%%: %%endmacro%% %%macro dialog_extendedsearch%% global_formobj=KeyValueField(request.content.read(-1));//we need it in several eq_xxx() calls... var butobj=eq_buttons(true); var the_macros=['cs_datectrl','scrip_prepare_search']; if (place("hyper.ftserver.searchengine.name")=="verity") the_macros.push('exsearch_verity_scripts'); //***** DIALOG SPECS *****// var dlg_spec={ caption:lrc("esDlgCap1","sear","Extended Search"), descr:lrc("esDlgDes1","sear","Extended search is a powerful feature which will help you find the documents you need."), buttons:butobj.buttons, formname:"EXSEARCH1", formaction:place("action.call.extended.search"), macro:the_macros, onsubmit:'prepareSearch(true)', onload:eq_onload(true), boxwidth:"640", opdlgfunc:1,moreless_scriptonly:1 //undocumented feature }; //***** SEARCH SPECS *****// var search1={paramspecs:[ {type:"plaintext",def:eq_moreless(lrc("esFrmLbl1","sear","Simple Search")+"...",true)}, {caption:lrc("searDlgTxt5","sear","Search for")+":",name:"Searchstring",focus:1}]}; var search2={paramspecs:[{type:"plainmacro",name:"inContents"}]}; var search3={paramspecs:[{type:"plainmacro",name:"search_mappings"}]}; var add3=search3.paramspecs; add3.push({caption:" ",name:"method_phrase_attribute",values:[{caption:lrc("esOptVal7","sear","All words searched for are in the same document")+" (AND)",value:"&"},{caption:lrc("esOptVal8","sear","One of the searched words is in a document")+" (OR)",value:"|"}]}); add3.push({caption:lrc("Owner","hwrc","Owner")+":",name:place("extended.search.form.var","s2")}); add3.push({type:"plainmacro",name:"created_modified"}); //***** FILTER SPECS *****// var separate={caption:"-----------------------------",value:""}; var mimes=hw_mimeTypes(); mimes.unshift({caption:"All",value:""},separate,{caption:"Text Documents (text/*)",value:"text/.*"},{caption:"Images (image/*)",value:"image/.*"},{caption:"Video Documents (video/*)",value:"video/.*"},{caption:"Audio Documents (audio/*)",value:"audio/.*"},separate); var filter_spec={paramspecs:[ {caption:"Mime-type:",name:place("extended.search.form.var","mimetype"),values:mimes}, {type:"plainmacro",name:"search_languages"}, {type:"plainmacro",name:"searchScope"}, {prompt:0,name:place("extended.search.form.var","fulltext")}, {prompt:0,name:place("extended.search.form.var","restrict2"),def:"!Type=Anchor"}, {prompt:0,name:place("extended.search.form.fulltextquery"),def:"fulltext"}, {prompt:0,name:place("extended.search.form.maxobjects"),def:"1000"}, {prompt:0,name:place("extended.search.form.var","ex1")}, {prompt:0,name:place("extended.search.form.map","useratts")}, {prompt:0,name:place("extended.search.form.map","restrict"),def:"Author=s2 && (TimeCreated<timecb && TimeCreated>timeca || TimeModified<timemb && TimeModified>timema)"}, {prompt:0,name:place("extended.search.form.keyquery"),def:"(keyword || title || name || useratts) && Author=s2 && TimeCreated>timeca<timecb && TimeModified>timema<timemb"}, {prompt:0,name:place("extended.search.form.objectquery"),def:"restrict && MimeType=mimetype && restrict2"}, {prompt:0,name:place("extended.search.form.sortorder"),def:"-S-C"}, {prompt:0,name:place("extended.search.form.iterative.isiterative"),def:"1"}, {prompt:0,name:place("extended.search.form.iterative.start.idx"),def:"0"}, {prompt:0,name:place("extended.search.form.iterative.exact.match.limit"),def:"100"} ]}; if (!request.actp) //if not editquery, add "Documents per Page" Select List. filter_spec.paramspecs.push({caption:lrc("searDlgTxt4","sear","Documents per page")+":",name:place("extended.search.form.iterative.relevant.objects"),values:[{caption:"10",value:"10"},{caption:"25",value:"25"},{caption:"50",value:"50"}]}); if (butobj.HW_DialogQuery) //Keep HW_DialogQuery when switching simple<->extended search filter_spec.paramspecs.push(butobj.HW_DialogQuery); if (butobj.configureAct) //Keep configureAct (Edit Query Track) when switching simple<->extended search filter_spec.paramspecs.push(butobj.configureAct); HW_DC_defaultMultiDialog(dlg_spec,[{caption:lrc("esDlgCap2","sear","Search"),boxes:[search1,search2,search3]},{caption:lrc("esDlgTxt15","sear","Filter Results By"),boxes:[filter_spec]}]); %%endmacro%%