GetAlldocumentsByKey to search in multiple fields

Hi all, i’ve a question about this.

I’ve a form with 4 fields, (call these A,B,C,D)

i want to implement a search on these fields: user have a text field where can put one or more words (blank separated). The result that i want is all documents in database that has words in A or B or C or D, but words could be also in field A and in B, and so on.

My first choice was to use db.search method in agent, where i specify formula like: @contains(A;words1) | @contains(A;words2)… | @contains(B;words1) | @contains(B;words2)…etc

It works fine, but it’s very slow. So i opted to use getAllDocumentsByKey method, that is much quicker, but i’ve to build a view with all permutations of fields in the column (fields also exploded by " "), and all compbinations of them.

Could someone please explain me if it’s correct or if there is a trick to perform this?

Thanks in advance to all…

Andrea

Subject: Access

Hi,It may be slower if you have READ/WRITE fields on these docs or if the view will contains a lot of documents.

Also, you relay on index update of the view which may slow your server/application performance.

on the other hand you can add a 4 columns view (A,b,c,d) and the do FTSearch with the same query.try it

Regards

Tamir Ben Shoshan

http://www.systbs.com

SharePoint & Lotus plugins & Notes CAPI