Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FTSearch does not return the correct document

Posted on 2002-06-28
8
Medium Priority
?
520 Views
Last Modified: 2013-12-18
I have an agent that asks the user to select a document in a list. The list displays the field "Description" of each document available.

After, it peforms an FTSearch to get that document from the same view that was used to build the list.

Say that there are 10 documents to choose from and one of them have the description "Doc 1" and another is "Doc 2". Sometimes when the user selects "Doc 2" it will find the document "Doc 1".

I can't figure out when this happens because somethimes it works correctly and sometimes not.

I tought it was because the user copied "Doc 1" and renamed the copy to "Doc 2". But I tested that and it seems to work.

I also tought it would be because my view was not sorted, so I sorted the description ascending and the error still occured

My view is hidden and contains 2 columns: Description and Structure (In that order)

None of the documents have the same description.

Here is my agent:
Sub Initialize
     Dim View As NotesView
     Dim Template As NotesDocument
     Dim ws As New NotesUIWorkSpace
     Dim s As String
     Dim Session As New NotesSession
     Set db = session.CurrentDatabase
     Set View = db.GetView("vTemplate")    
     
     s = ws.Prompt(PROMPT_OKCANCELLIST,"Choice","Choose a template:",,Evaluate("@DbColumn(''; ''; '(LookupTemplate)'; 1)"))
     If Trim(s) <> "" Then
          s = Chr(34) & s & Chr(34)
          view.FTSearch s,1    
          Set Template = View.GetFirstDocument
          Msgbox Template.Structure(0)
     End If
End Sub

Thanks in advance
0
Comment
Question by:Pennywisdom
[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
  • 4
  • 3
8 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7116618
Try updating FT index of the database.

Secondly, instead of this line

s = Chr(34) & s & Chr(34)


use this

s = |"| + s + |"|     ' WHich will be equivalent to "s"



~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7116622
also replace 1 with 0 in ftsearch
0
 

Author Comment

by:Pennywisdom
ID: 7116695
Thanks for your reply ~Hemanth.

The help says that NotesDatabase.UpdateFTIndex will create an index only on a local database.

My database is on a server so "db.UpdateFTIndex True" gives me an error.
"db.UpdateFTIndex False" does not give me an error but db.IsFTIndexed still returns false after.
Does this mean that it's not working? Or is it normal?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 800 total points
ID: 7116827
Well it depends on what level of access that you have,you should have atleast designer access to create index.

This can be created manually a one time setup. No need to drive it thru script.

Goto Database..Properties and click on lens icon (Full Text tab), and click on create index.

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7116835
Hello PW,

this note in Help does only concern databases that do NOT have a FT index and a new FT index has to be created.
To verify that "Call db.UpdateFTIndex(False)" is working correctly test this:
1.) Set FT Update Frequency from Immediate to Daly.
2.) Add a document containing a new string combination.
3.) Search in Notes client for this string (should not hit).
4.) Run your agent containing: db.UpdateFTIndex(False)
5.) Search again in Notes client and you will see that FT index was updated.

Regards,
zvonko

0
 

Author Comment

by:Pennywisdom
ID: 7116865
Ok I created the index like Hemantha told me to.

I'll test this and let you know the results has soon as I can.
0
 

Author Comment

by:Pennywisdom
ID: 7143351
Thanks! Seems like indexing did the trick.

Sorry for the delay but I had to make sure it was working since it didn't always bug.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7143426
Anytime
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
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: …
Suggested Courses

722 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