public abstract class SearchCollectionSupport extends Object implements SearchCollectionPlus
SEARCH_TYPE_EXPLICIT, SEARCH_TYPE_SIMPLE
Constructor and Description |
---|
SearchCollectionSupport(SearchEngineSupport searchEngine,
String name,
Resource path,
String language,
DateTime lastUpdate,
DateTime created)
constructor of the class
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(SearchIndex index) |
void |
create()
create a collection
|
Object |
created()
return time when collection was created
|
IndexResult |
delete()
delete the collection
|
IndexResult |
deleteCustom(String id,
QueryColumn keyColumn) |
IndexResult |
deleteIndex(PageContext pc,
String key,
short type,
String queryName)
delete a Index from collection
|
IndexResult |
deleteIndexNotCustom(PageContext pc,
String key,
short type,
String queryName) |
DateTime |
getCreated() |
static String |
getDirectory(String strUrl) |
Object |
getIndexesAsQuery() |
String |
getLanguage() |
DateTime |
getLastUpdate() |
Log |
getLogger() |
String |
getName() |
Resource |
getPath() |
SearchEngine |
getSearchEngine() |
IndexResult |
index(PageContext pc,
String key,
short type,
String urlpath,
String title,
String body,
String language,
String[] extensions,
String query,
boolean recurse,
String categoryTree,
String[] categories,
long timeout,
String custom1,
String custom2,
String custom3,
String custom4) |
IndexResult |
index(PageContext pc,
String key,
short type,
String urlpath,
String title,
String body,
String language,
String[] extensions,
String query,
boolean recurse,
String categoryTree,
String[] categories,
String custom1,
String custom2,
String custom3,
String custom4)
updates a index of a collection
|
IndexResult |
indexCustom(String id,
Object title,
QueryColumn keyColumn,
QueryColumn[] bodyColumns,
String language,
Object urlpath,
Object custom1,
Object custom2,
Object custom3,
Object custom4) |
IndexResult |
indexCustom(String id,
QueryColumn title,
QueryColumn keyColumn,
QueryColumn[] bodyColumns,
String language,
QueryColumn custom1,
QueryColumn custom2,
QueryColumn custom3,
QueryColumn custom4)
updates a collection with a custom
|
IndexResult |
indexFile(String id,
String title,
Resource res,
String language)
updates a collection with a file
|
IndexResult |
indexPath(String id,
String title,
Resource dir,
String[] extensions,
boolean recurse,
String language)
updates a collection with a path
|
IndexResult |
indexURL(String id,
String title,
URL url,
String[] extensions,
boolean recurse,
String language)
updates a collection with a url
|
IndexResult |
indexURL(String id,
String title,
URL url,
String[] extensions,
boolean recurse,
String language,
long timeout) |
void |
map(Resource path)
map a Collection
|
void |
optimize()
optimize a Collection
|
IndexResult |
purge()
purge a collection
|
void |
repair()
repair a Collection
|
int |
search(SearchData data,
Query qry,
String criteria,
String language,
short type,
int startrow,
int maxrow,
String categoryTree,
String[] categories)
search the collection
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_search, getCategoryInfo, getDocumentCount, getDocumentCount, getSize
public SearchCollectionSupport(SearchEngineSupport searchEngine, String name, Resource path, String language, DateTime lastUpdate, DateTime created)
searchEngine
- name
- name of the Collectionpath
- language
- count
- total count of documents in the collectionlastUpdate
- created
- public final void create() throws SearchException
SearchCollection
create
in interface SearchCollection
SearchException
public final void optimize() throws SearchException
SearchCollection
optimize
in interface SearchCollection
SearchException
public final void map(Resource path) throws SearchException
SearchCollection
map
in interface SearchCollection
SearchException
public final void repair() throws SearchException
SearchCollection
repair
in interface SearchCollection
SearchException
public IndexResult index(PageContext pc, String key, short type, String urlpath, String title, String body, String language, String[] extensions, String query, boolean recurse, String categoryTree, String[] categories, String custom1, String custom2, String custom3, String custom4) throws PageException, MalformedURLException, SearchException
SearchCollection
index
in interface SearchCollection
PageException
MalformedURLException
SearchException
public IndexResult index(PageContext pc, String key, short type, String urlpath, String title, String body, String language, String[] extensions, String query, boolean recurse, String categoryTree, String[] categories, long timeout, String custom1, String custom2, String custom3, String custom4) throws PageException, MalformedURLException, SearchException
public final IndexResult indexFile(String id, String title, Resource res, String language) throws SearchException
SearchCollection
indexFile
in interface SearchCollection
SearchException
public final IndexResult indexPath(String id, String title, Resource dir, String[] extensions, boolean recurse, String language) throws SearchException
SearchCollection
indexPath
in interface SearchCollection
SearchException
public final IndexResult indexURL(String id, String title, URL url, String[] extensions, boolean recurse, String language) throws SearchException
SearchCollection
indexURL
in interface SearchCollection
SearchException
public final IndexResult indexURL(String id, String title, URL url, String[] extensions, boolean recurse, String language, long timeout) throws SearchException
SearchException
public final IndexResult indexCustom(String id, QueryColumn title, QueryColumn keyColumn, QueryColumn[] bodyColumns, String language, QueryColumn custom1, QueryColumn custom2, QueryColumn custom3, QueryColumn custom4) throws SearchException
SearchCollection
indexCustom
in interface SearchCollection
title
- Title for the IndexkeyColumn
- Key ColumnbodyColumns
- Body Column Arraylanguage
- Language for indexSearchException
public final IndexResult indexCustom(String id, Object title, QueryColumn keyColumn, QueryColumn[] bodyColumns, String language, Object urlpath, Object custom1, Object custom2, Object custom3, Object custom4) throws SearchException
SearchException
public final IndexResult deleteCustom(String id, QueryColumn keyColumn) throws SearchException
SearchException
public void addIndex(SearchIndex index)
addIndex
in interface SearchCollectionPlus
index
- public final String getLanguage()
getLanguage
in interface SearchCollection
public final IndexResult purge() throws SearchException
SearchCollection
purge
in interface SearchCollection
SearchException
public final IndexResult delete() throws SearchException
SearchCollection
delete
in interface SearchCollection
SearchException
public final IndexResult deleteIndex(PageContext pc, String key, short type, String queryName) throws SearchException
SearchCollection
deleteIndex
in interface SearchCollection
SearchException
public final IndexResult deleteIndexNotCustom(PageContext pc, String key, short type, String queryName) throws SearchException
SearchException
public final Resource getPath()
getPath
in interface SearchCollection
public DateTime getCreated()
getCreated
in interface SearchCollection
public final DateTime getLastUpdate()
getLastUpdate
in interface SearchCollection
public final String getName()
getName
in interface SearchCollection
public final Log getLogger()
getLogger
in interface SearchCollection
public final SearchEngine getSearchEngine()
getSearchEngine
in interface SearchCollection
public Object created()
SearchCollection
created
in interface SearchCollection
public final int search(SearchData data, Query qry, String criteria, String language, short type, int startrow, int maxrow, String categoryTree, String[] categories) throws SearchException, PageException
SearchCollection
search
in interface SearchCollection
qry
- Query to append resutstype
- SEARCH_TYPE_EXPLICIT or SEARCH_TYPE_SIMPLESearchException
PageException
public static String getDirectory(String strUrl) throws MalformedURLException
MalformedURLException
public Object getIndexesAsQuery()
Copyright © 2015 Lucee