如何使用搜索方法进行Lotus Notes文档搜索 [英] How to use search method for Lotus Notes document search

查看:105
本文介绍了如何使用搜索方法进行Lotus Notes文档搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是收集Lotus Notes文档,对于给定的一组搜索词,其包含以下任一内容:

My requirement is to collect the Lotus Notes documents which, for a given set of search terms, contain either:

  • 所有这些条款
  • 任何这些条款
  • 或这些都不是.

我正在使用 Database.FTsearch(...) 方法,生成特定短语的查询并将查询传递给该方法.我发现还有另一种方法: Database.search(string arg1).如何针对上述所有三个条件使用该方法?

I am using the Database.FTsearch(...) method by generating a query for the particular phrase and passing the query to that method. I found that there is another method: Database.search(string arg1). How can I use that method for all the three of the conditions mentioned above?

推荐答案

The NotesDatabase search method takes a formula string as its first parameter. You can pass a formula such as:

@Contains(Body; "Word1") || @Contains(Body; "Word2") || @Contains(Body; "Word3")

如果三个单词中的任何一个都在正文中,则哪个将与文档匹配.要使其与所有单词都匹配,只需将OR(||)更改为AND(&&).

Which would match the document if any of the three words were in the body. To make it match on all words, just change the ORs (||) to ANDs (&&).

请注意,此方法在没有索引的情况下搜索所有文档,如果有数千个文档,则速度可能会非常慢. FTSearch方法较快,但需要完全填写-文本索引可以有效地工作.

Note that this method searches through all documents without an index, and can be very slow if there thousands of documents. The FTSearch method is faster but requires you to turn full-text indexing on to work efficiently.

这篇关于如何使用搜索方法进行Lotus Notes文档搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆