?
Solved

Syntax help from Regular Search to FTSearch

Posted on 2004-10-01
15
Medium Priority
?
731 Views
Last Modified: 2013-12-18
Hi,

Need some help in syntax. Currently have this in one of my agents...

                                Let SearchFormula$ = "Form = ""ProfileX"" & " _
            & "@Text(EBID) = """ & IREBID$ & """ & " _
            & "@Trim(MTN) = """ & TIRMAN$ & """ & " _  
            & "@Isresponsedoc= 0  & "_
            & "Profilestatus != """ & """ "               

                                Set Collection = db.search( SearchFormula$, Nothing, 0 )
This is taking lot of time especially when there are many documents....

I need help to convert this into FTSearch....

thanks
Sridevi
0
Comment
Question by:sridevi911
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
15 Comments
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 12199949
Just make it Set Collection = db.FTSearch(SearchFormula$, Nothing, 0)
0
 

Author Comment

by:sridevi911
ID: 12200085
thats it and it will make it much better.

Any other advice to improve this. It is taking a lot of time to search.

0
 

Author Comment

by:sridevi911
ID: 12200121
I tried this:
Set Collection = db.FTSearch(SearchFormula$, Nothing, 0)

It is giving me  syntax error
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12200126
FTIndex the database... it will improve overall search performance..

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12200223
There are some rules for FTSearch.. You cannot use @isResponseDoc And also to find a field by value use FIELD Form = "FormName"

For full list check this link..http://www-1.ibm.com/support/docview.wss?rs=899&uid=swg27003210
0
 

Author Comment

by:sridevi911
ID: 12200451
Hemanth, How do I FTIndex the database. I know how to create the Index in a database going to the DB properties. But how do i FTIndex. Meanwhile I'll also check the list you provided above.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12200519
Goto the database properties.. lens icon tab ...click create index.. Once created it will be updated or you can specify update frequency (Immediate is recommended for high tx db)
0
 

Author Comment

by:sridevi911
ID: 12200678
Oh ok, I all ready have my database indexed.  I did not knew that is also called FTIndex.

Hemanth, I've decided to use a view search instead of this one as it is much faster...

Here is the code for that.
First In the view's select formula I've used Select form & Isresponsedoc = 0. In this way I dont have to use @IsReponsedoc in my formula.

Now in the view's first column I've field EBID and second column is field MTN.
View name is VAMView

Set Collection = db.getView("VAMView").getAllDocumentsByKey(needtoputfieldhere,True)      

Lete say in my agent, I've these two fields : InputEBID and InputMTN.
So I've to take these two fields and search the view bases on these two fields.

How do I put these two fields in the 'needtoputfieldhere'.  

thanks
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12200792
Concat these two fields in the view's first column with a delimiter (InputEBID + "~_~" + InputMTN)

And use the same combination in the view search
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12200824
or you can use keyarray and pass it to the function

keyarray(0) = note.InputEBID(0) ' This looks at your first column in the view
keyarray(1) = note.InputMTN(0) ' This looks at your second column in the view

Set Collection = db.getView("VAMView").getAllDocumentsByKey(keyarray,True)  

 


0
 

Author Comment

by:sridevi911
ID: 12200857
Great, let me try that Hemanth
0
 

Author Comment

by:sridevi911
ID: 12200874
But if I use keyarray in the search... dosen't the first column in the view have the following formula right
EBID + MTN ?
0
 

Author Comment

by:sridevi911
ID: 12200880
also will this view search be faster than any other searches ?
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 400 total points
ID: 12200929
Yes the I column should be EBID , sorted similarly second col would be MTN, sorted !

In theroy Full text search are pretty much faster than view ... But if you are relying on one single form out of tons of forms.. then view soln suits best
0
 

Author Comment

by:sridevi911
ID: 12202888
Super.. works fine hemanth.... I used the View Search as it is much better in my case.

thanks
Sridevi.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question