1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package de.bea.domingo;
24
25 import java.util.Iterator;
26
27 /***
28 * Represents a collection of documents and provides access to documents
29 * within it.
30 *
31 * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
32 */
33 public interface DDocumentCollection extends DBase {
34
35 /***
36 * Returns an Iterator to loop over all documents in the view.
37 *
38 * @return Iterator
39 */
40 Iterator getAllDocuments();
41
42 /***
43 * Conducts a full-text search of all the documents in a document
44 * collection, and reduces the collection to a sorted collection of those
45 * documents that match.
46 *
47 * <p>See {@link #fullTextSearch(String, int)} for more details.</p>
48 *
49 * @param query The full-text query
50 */
51 void fullTextSearch(String query);
52
53 /***
54 * Conducts a full-text search of all the documents in a document
55 * collection, and reduces the collection to a sorted collection of those
56 * documents that match.
57 *
58 * <p><b>Usage</b></p>
59 * <p>This method moves the current pointer to the first document in the
60 * collection. The collection of documents that match the full-text query
61 * are sorted by relevance, with highest relevance first. You can access the
62 * relevance score of each document in the collection using
63 * {@link DDocument#getFTSearchScore()} in DDocument.</p>
64 *
65 * <p>If the database is not full-text indexed, this method works,
66 * but less efficiently. To test for an index, use {@link DDatabase#isFTIndexed()}.</p>
67 * <p>To create an index on a local database, use {@link DDatabase#updateFTIndex(boolean)}.</p>
68 *
69 * <p>This method searches all documents in a document collection. To search all documents in a
70 * database, use FTSearch in Database. To search only documents found in a
71 * particular view, use FTSearch in View or FTSearch in ViewEntryCollection.</p>
72 *
73 * <p><b>Query syntax</b></p>
74 * <p>To search for a word or phrase, enter the word or phrase as is,
75 * except that search keywords must be enclosed in quotes. Remember to
76 * escape quotes if you are inside a literal. Wildcards, operators, and
77 * other syntax are permitted. For the complete syntax rules, see "Finding
78 * documents in a database" in Lotus Notes 6 Help.</p>
79 *
80 * @param query The full-text query
81 * @param maxdocs The maximum number of documents you want returned from the
82 * query. Set this parameter to 0 to receive all matching
83 * documents.
84 */
85 void fullTextSearch(String query, int maxdocs);
86 }