public interface LuceneService
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Delete all cached data
|
long |
getCacheSize()
Get the size of the cached data
|
InvocationFuture<java.util.List<MsgIndexRecord>> |
searchAllSession(java.lang.String query,
int limit)
Query all sessions and return the count of all matched messages from each session and the most recent message that hit the search condition.
|
java.util.List<MsgIndexRecord> |
searchAllSessionBlock(java.lang.String query,
int limit)
Query all sessions and return the count of all matched messages from each session and the most recent message that hit the search condition.
|
InvocationFuture<java.util.List<MsgIndexRecord>> |
searchSession(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId)
Query messages in a specified session and return the matched result.
|
java.util.List<MsgIndexRecord> |
searchSessionBlock(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId)
Query messages in a specified session and return the matched result.
|
int |
searchSessionMatchCount(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId)
Result count for a search with specified keywords (sync)
|
InvocationFuture<java.util.List<MsgIndexRecord>> |
searchSessionNextPage(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId,
MsgIndexRecord anchor,
int pageSize)
Specify keywords for search.
|
java.util.List<MsgIndexRecord> |
searchSessionNextPageBlock(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId,
MsgIndexRecord anchor,
int pageSize)
Specify keywords for search.
|
InvocationFuture<java.util.List<MsgIndexRecord>> |
searchSessionPage(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId,
int pageIndex,
int pageSize)
Specify keywords for search.
|
java.util.List<MsgIndexRecord> |
searchSessionPageBlock(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId,
int pageIndex,
int pageSize)
Specify keywords for search.
|
int |
searchSessionPageCount(java.lang.String query,
SessionTypeEnum sessionType,
java.lang.String sessionId,
int pageSize)
Number of pages for a search with specified keywords (sync)
|
InvocationFuture<java.util.List<MsgIndexRecord>> searchAllSession(java.lang.String query, int limit)
query
- The strings to be queriedlimit
- The limit of returned messagesjava.util.List<MsgIndexRecord> searchAllSessionBlock(java.lang.String query, int limit)
query
- The strings to be queriedlimit
- The limit of returned messagesInvocationFuture<java.util.List<MsgIndexRecord>> searchSession(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDjava.util.List<MsgIndexRecord> searchSessionBlock(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDInvocationFuture<java.util.List<MsgIndexRecord>> searchSessionPage(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId, int pageIndex, int pageSize)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDpageIndex
- Page number starting from 1pageSize
- Number of entries displayed per pagejava.util.List<MsgIndexRecord> searchSessionPageBlock(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId, int pageIndex, int pageSize)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDpageIndex
- Page number starting from 1pageSize
- Number of entries displayed per pageInvocationFuture<java.util.List<MsgIndexRecord>> searchSessionNextPage(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId, MsgIndexRecord anchor, int pageSize)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDanchor
- pass in null for the first page, and last entry of the previous page for the next page.pageSize
- Number of entries displayed per pagejava.util.List<MsgIndexRecord> searchSessionNextPageBlock(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId, MsgIndexRecord anchor, int pageSize)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDanchor
- pass in null for the first page, and last entry of the previous page for the next page.pageSize
- Number of entries displayed per pageint searchSessionMatchCount(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDint searchSessionPageCount(java.lang.String query, SessionTypeEnum sessionType, java.lang.String sessionId, int pageSize)
query
- The strings to be queriedsessionType
- The session type (P2P or group)sessionId
- the session IDpageSize
- Number of entries displayed per pagelong getCacheSize()
void clearCache()