Field-Specific Web Searches

I wanted to do field specific full-text searches over the Web without writing LotusScript. I used the Advanced Web Search form from the SearchSite db as the template. The example below searches for demographic data.


REM "Query Field - Text - Computed"
wsep:=@If(AnyAll="1";" AND ";AnyAll="0";" OR ";"");
dsep:=@If(BeforeAfter="0";" = ";BeforeAfter="1";" > ";BeforeAfter="-1";" < ";"");
firstname := @If( FName = NULL ; NULL ; "(FIELD FName Contains " + FName + ")" ) ;
lastname := @If( LName = NULL ; NULL ; "(FIELD LName Contains " + LName + ")" ) ;
pnum := @If( Phone = NULL ; NULL ; "(FIELD Phone Contains " + Phone + ")" ) ;
mail := @If( Email = NULL ; NULL ; "(FIELD Email Contains " + Email + ")" ) ;
loc := @If( City = NULL ; NULL ; "(FIELD City Contains " + City + ")" ) ;
val1 := @Trim( firstname:lastname:pnum:mail:loc ) ;
wdate:=@If
(CreateModify="1";"[_CreationDate]";CreateModify="2";"[_RevisionDate]";"");
wstring := @Implode( val1 ; wsep ) ;
dstring:=@If(QueryDate!="";wdate+dsep+@Text(QueryDate)+@If(BeforeAfter="-1";" AND "+wdate+" > 01/01/1932";"");"");
cstring:=@If(DbCategories!="";"[DbCategories] CONTAINS ("+@Implode(dbcategories;",")+")";"");
@If(wstring!="";"("+wstring+")";"")+@If(wstring!="" & dstring!="";" AND " + "(" +dstring+")"; dstring!="";"("+dstring+")";"") + @If( (wstring!="" | dstring!="") & cstring!="";" AND " +"("+ cstring+")";cstring!="";"("+cstring+")";"")

REM "$$Return Field - text - Computed"
DBName:=@Subset(@DbName;-1);
"[[/"+DBName+"/Contacts?SearchView&Query="+Query+"&SearchOrder="+@Text(Sort)+"&SearchMax="+@Text(MaxResults)+"&SearchWV="+@If(ExactMatch="";"TRUE";"FALSE")+"&SearchThesaurus="+@If(UseThesaurus="";"FALSE";"TRUE")+"]]"

This was last published in March 2001

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close