ビュー内のすべての文書の全文検索を実行してビューをフィルタし、全文照会に一致する文書のみをソートされた順序で示すようにします。
FTSearchSorted(query:string, maxdocs:int) : int
FTSearchSorted(query:string, maxdocs:int, column:string) : int
FTSearchSorted(query:string, maxdocs:int, column:string, ascending:boolean, exact:boolean, variants:boolean, fuzzy:boolean) : int
FTSearchSorted(query:string, maxdocs:int, column:int) : int
FTSearchSorted(query:string, maxdocs:int, column:int, ascending:boolean, exact:boolean, variants:boolean, fuzzy:boolean) : int
FTSearchSorted(query:java.util.Vector) : int
FTSearchSorted(query:java.util.Vector, maxdocs:int) : int
FTSearchSorted(query:java.util.Vector, maxdocs:int, column:string) : int
FTSearchSorted(query:java.util.Vector, maxdocs:int, column:string, ascending:boolean, exact:boolean, variants:boolean, fuzzy:boolean) : int
FTSearchSorted(query:java.util.Vector, maxdocs:int, column:int) : int
FTSearchSorted(query:java.util.Vector, maxdocs:int, column:int, ascending:boolean, exact:boolean, variants:boolean, fuzzy:boolean) : int
パラメータ | 説明 |
---|---|
query | フルテキストの照会、または複数照会の共通部分。照会の構文については、以下を参照してください。 |
maxdocs | 検索で返される文書の最大数。 照会に一致するすべての文書を取得する場合は、0 を指定します。デフォルトは 0 です。 |
column | ソートする列の名前または 0 ベースの索引。 NotesView.VIEW_FTSS_RELEVANCE_ORDER (512) と指定すると、大文字小文字の厳密な識別、活用形、あいまい検索のための拡張フラグの使用が有効になり、関連度の順に結果が返されます。 |
ascending | true の場合、列のデータを昇順にソートし、false の場合、降順にソートします。デフォルトは true です。
NotesView.VIEW_FTSS_RELEVANCE_ORDER が有効な場合は無視されます。 列を昇順または降順にソートできるかどうかは、列のプロパティの [ソート] タブの [列のヘッダーをクリック時にソート] によって決まります。該当するオプションは、[昇順]、[降順]、[両方] です。サポートされない方向に列をソートしようとすると、例外がスローされます。 |
exact | true の場合、大文字小文字の厳密な識別を検索に適用します。デフォルトは false。 |
variants | true の場合、検索結果に単語の活用形を返します。デフォルトは false。 |
fuzzy | true の場合、検索結果につづりが異なる語句を返します。デフォルトは false。 |
戻り値 | 説明 |
---|---|
int | 検索後のビュー内の文書数。 これらの文書はすべて照会に一致します。 |
全文検索のフィルタをクリアするには、clear メソッドを使用します。 クリアすると、各 NotesView メソッドで、ビュー内のすべての文書をナビゲートできます。
データベースが全文索引付きでない場合、このメソッドは有効ですが、効率は低下します。索引をテストするには、isFTIndexed を使用します。 ローカルデータベース上に索引を作成するには、updateFTIndex を使用します。
ワイルドカードや演算子などの構文も使用できます。詳細な構文規則については、『Notes® ヘルプ』を参照してください。 Domino® Designer Eclipse のヘルプシステムまたはインフォメーションセンター (http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp など) で「照会構文」について検索してください (どちらも IBM Notes から利用できます)。
if (database.isFTIndexed()) {
database.updateFTIndex(false)
} else {
database.createFTIndex(0, true)
}
requestScope.status = "";
var v:NotesView = database.getView("main");
if (requestScope.query1 == null) return;
if (v.FTSearchSorted(requestScope.query1, 0, "year") == 0) return;
var doc:NotesDocument = v.getFirstDocument();
while (doc != null) {
requestScope.status += "¥n" +
doc.getItemValueString("model") + " " +
doc.getItemValueString("color") + " " +
doc.getItemValueString("year");
var tmpdoc = v.getNextDocument(doc);
doc.recycle();
doc = tmpdoc;
}
if (database.isFTIndexed()) {
database.updateFTIndex(false)
} else {
database.createFTIndex(0, true)
}
requestScope.status = "";
var v:NotesView = database.getView("main");
if (requestScope.query1 == null) return;
if (v.FTSearchSorted(requestScope.query1, 0, NotesView.VIEW_FTSS_RELEVANCE_ORDER) == 0) return;
var doc:NotesDocument = v.getFirstDocument();
while (doc != null) {
requestScope.status += "¥n" +
doc.getItemValueString("model") + " " +
doc.getItemValueString("color") + " " +
doc.getItemValueString("year");
var tmpdoc = v.getNextDocument(doc);
doc.recycle();
doc = tmpdoc;
}
if (database.isFTIndexed()) {
database.updateFTIndex(false)
} else {
database.createFTIndex(0, true)
}
requestScope.status = "";
var v:NotesView = database.getView("main");
if (requestScope.query1 == null) return;
if (requestScope.query2 == null) return;
var query = new java.util.Vector();
query.add(requestScope.query1);
query.add(requestScope.query2);
if (v.FTSearchSorted(query, 0, 0) == 0) return;
var doc:NotesDocument = v.getFirstDocument();
while (doc != null) {
requestScope.status += "¥n" +
doc.getItemValueString("model") + " " +
doc.getItemValueString("color") + " " +
doc.getItemValueString("year");
var tmpdoc = v.getNextDocument(doc);
doc.recycle();
doc = tmpdoc;
}
if (database.isFTIndexed()) {
database.updateFTIndex(false)
} else {
database.createFTIndex(0, true)
}
requestScope.status = "";
var v:NotesView = database.getView("main");
if (requestScope.query1 == null) return;
if (v.FTSearchSorted(requestScope.query1, 4, 1, false, false, true, true) == 0) return;
var doc:NotesDocument = v.getFirstDocument();
while (doc != null) {
requestScope.status += "¥n" +
doc.getItemValueString("model") + " " +
doc.getItemValueString("color") + " " +
doc.getItemValueString("year");
var tmpdoc = v.getNextDocument(doc);
doc.recycle();
doc = tmpdoc;
}