1 /*
2 * Copyright 2012-2025 CodeLibs Project and the Others.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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,
13 * either express or implied. See the License for the specific language
14 * governing permissions and limitations under the License.
15 */
16 package org.codelibs.fess.entity;
17
18 import java.util.Map;
19
20 /**
21 * Interface for search log events in the Fess search system.
22 *
23 * This interface defines the contract for search log event objects that can be
24 * written to log files or stored in the search index. Implementations include
25 * search logs, click logs, favorite logs, and user information logs.
26 */
27 public interface SearchLogEvent {
28 /**
29 * Gets the unique identifier for this search log event.
30 *
31 * @return The event ID
32 */
33 String getId();
34
35 /**
36 * Gets the version number for this search log event.
37 *
38 * @return The version number, or null if not versioned
39 */
40 Long getVersionNo();
41
42 /**
43 * Converts this search log event to a source map for indexing or logging.
44 *
45 * @return Map representation of the event data
46 */
47 Map<String, Object> toSource();
48
49 /**
50 * Gets the type of this search log event.
51 *
52 * @return The event type (e.g., "search", "click", "favorite", "user_info")
53 */
54 String getEventType();
55 }