01: /*
02: * Copyright 2004 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.outerj.daisy.ftindex;
17:
18: import org.outerj.daisy.repository.query.QueryException;
19:
20: public interface FullTextIndex {
21: /**
22: * Peforms a search on the fulltext search.
23: *
24: * <p><b>It is of high importance that the caller calls the dispose method on the returned Hits object.
25: * This should be guaranteed to happen, i.o.w. use a try-finally block.</b></p>
26: */
27: Hits search(String query, long branchId, long languageId,
28: boolean searchName, boolean searchContent,
29: boolean searchFields) throws QueryException;
30:
31: /**
32: * Index the given content for the given document variant.
33: * This will first delete any previous indexed content for that document variant, and then index
34: * the new content.
35: *
36: * <p>The parameters documentName, content and fields are all optional (can all be null),
37: * if they are all null then the index for this document will just be deleted.
38: */
39: void index(String documentId, long branchId, long languageId,
40: String documentName, String content, String fields)
41: throws Exception;
42: }
|