railo.runtime.search
Class SearchCollectionSupport2

java.lang.Object
  extended by railo.runtime.search.SearchCollectionSupport2
All Implemented Interfaces:
Serializable, SearchCollection, SearchCollectionPlus

public abstract class SearchCollectionSupport2
extends Object
implements SearchCollectionPlus

represent a single Collection

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface railo.runtime.search.SearchCollection
SEARCH_TYPE_EXPLICIT, SEARCH_TYPE_SIMPLE
 
Constructor Summary
SearchCollectionSupport2(SearchEngineSupport searchEngine, String name, Resource path, String language, DateTime lastUpdate, DateTime created)
          constructor of the class
 
Method Summary
 void addIndex(SearchIndex index)
           
 void create()
          create a collection
 Object created()
          return time when collection was created
 IndexResult delete()
          delete the collection
 IndexResult deleteIndex(PageContext pc, String key, short type, String queryName)
          delete a Index from collection
 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(SearchIndex si, QueryColumn colTitle, QueryColumn keyColumn, QueryColumn[] bodyColumns, QueryColumn ct1Column, QueryColumn ct2Column, QueryColumn ct3Column, QueryColumn ct4Column)
           
 IndexResult indexCustom(SearchIndex si, QueryColumn colTitle, QueryColumn keyColumn, QueryColumn[] bodyColumns, QueryColumn urlpath, QueryColumn ct1Column, QueryColumn ct2Column, QueryColumn ct3Column, QueryColumn ct4Column)
           
 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(SearchIndex si, Resource file)
           
 IndexResult indexFile(String id, String title, Resource res, String language)
          updates a collection with a file
 IndexResult indexPath(SearchIndex si, Resource dir, boolean recurse)
           
 IndexResult indexPath(String id, String title, Resource dir, String[] extensions, boolean recurse, String language)
          updates a collection with a path
 IndexResult indexURL(SearchIndex si, URL url, boolean recurse, long timeout)
           
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface railo.runtime.search.SearchCollection
_search, getCategoryInfo, getDocumentCount, getDocumentCount, getSize
 

Constructor Detail

SearchCollectionSupport2

public SearchCollectionSupport2(SearchEngineSupport searchEngine,
                                String name,
                                Resource path,
                                String language,
                                DateTime lastUpdate,
                                DateTime created)
constructor of the class

Parameters:
searchEngine -
name - name of the Collection
path -
language -
count - total count of documents in the collection
lastUpdate -
created -
Method Detail

create

public final void create()
                  throws SearchException
Description copied from interface: SearchCollection
create a collection

Specified by:
create in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.create()

optimize

public final void optimize()
                    throws SearchException
Description copied from interface: SearchCollection
optimize a Collection

Specified by:
optimize in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.optimize()

map

public final void map(Resource path)
               throws SearchException
Description copied from interface: SearchCollection
map a Collection

Specified by:
map in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.map(railo.commons.io.res.Resource)

repair

public final void repair()
                  throws SearchException
Description copied from interface: SearchCollection
repair a Collection

Specified by:
repair in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.repair()

index

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
Description copied from interface: SearchCollection
updates a index of a collection

Specified by:
index in interface SearchCollection
Returns:
Throws:
PageException
MalformedURLException
SearchException
See Also:
SearchCollection.index(railo.runtime.PageContext, java.lang.String, short, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.String, boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String)

index

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
Throws:
PageException
MalformedURLException
SearchException

indexFile

public final IndexResult indexFile(String id,
                                   String title,
                                   Resource res,
                                   String language)
                            throws SearchException
Description copied from interface: SearchCollection
updates a collection with a file

Specified by:
indexFile in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.indexFile(java.lang.String, java.lang.String, railo.commons.io.res.Resource, java.lang.String)

indexFile

public final IndexResult indexFile(SearchIndex si,
                                   Resource file)
                            throws SearchException
Throws:
SearchException

indexPath

public final IndexResult indexPath(String id,
                                   String title,
                                   Resource dir,
                                   String[] extensions,
                                   boolean recurse,
                                   String language)
                            throws SearchException
Description copied from interface: SearchCollection
updates a collection with a path

Specified by:
indexPath in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.indexPath(java.lang.String, java.lang.String, railo.commons.io.res.Resource, java.lang.String[], boolean, java.lang.String)

indexPath

public final IndexResult indexPath(SearchIndex si,
                                   Resource dir,
                                   boolean recurse)
                            throws SearchException
Throws:
SearchException

indexURL

public final IndexResult indexURL(String id,
                                  String title,
                                  URL url,
                                  String[] extensions,
                                  boolean recurse,
                                  String language)
                           throws SearchException
Description copied from interface: SearchCollection
updates a collection with a url

Specified by:
indexURL in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.indexURL(java.lang.String, java.lang.String, java.net.URL, java.lang.String[], boolean, java.lang.String)

indexURL

public final IndexResult indexURL(String id,
                                  String title,
                                  URL url,
                                  String[] extensions,
                                  boolean recurse,
                                  String language,
                                  long timeout)
                           throws SearchException
Throws:
SearchException

indexURL

public final IndexResult indexURL(SearchIndex si,
                                  URL url,
                                  boolean recurse,
                                  long timeout)
                           throws SearchException
Throws:
SearchException

indexCustom

public final IndexResult indexCustom(String id,
                                     QueryColumn title,
                                     QueryColumn keyColumn,
                                     QueryColumn[] bodyColumns,
                                     String language,
                                     QueryColumn custom1,
                                     QueryColumn custom2,
                                     QueryColumn custom3,
                                     QueryColumn custom4)
                              throws SearchException
Description copied from interface: SearchCollection
updates a collection with a custom

Specified by:
indexCustom in interface SearchCollection
title - Title for the Index
keyColumn - Key Column
bodyColumns - Body Column Array
language - Language for index
Throws:
SearchException
See Also:
SearchCollection.indexCustom(java.lang.String, railo.runtime.type.QueryColumn, railo.runtime.type.QueryColumn, railo.runtime.type.QueryColumn[], java.lang.String, railo.runtime.type.QueryColumn, railo.runtime.type.QueryColumn, railo.runtime.type.QueryColumn, railo.runtime.type.QueryColumn)

indexCustom

public final IndexResult indexCustom(SearchIndex si,
                                     QueryColumn colTitle,
                                     QueryColumn keyColumn,
                                     QueryColumn[] bodyColumns,
                                     QueryColumn ct1Column,
                                     QueryColumn ct2Column,
                                     QueryColumn ct3Column,
                                     QueryColumn ct4Column)
                              throws SearchException
Throws:
SearchException

indexCustom

public final IndexResult indexCustom(SearchIndex si,
                                     QueryColumn colTitle,
                                     QueryColumn keyColumn,
                                     QueryColumn[] bodyColumns,
                                     QueryColumn urlpath,
                                     QueryColumn ct1Column,
                                     QueryColumn ct2Column,
                                     QueryColumn ct3Column,
                                     QueryColumn ct4Column)
                              throws SearchException
Throws:
SearchException

addIndex

public void addIndex(SearchIndex index)
Specified by:
addIndex in interface SearchCollectionPlus
Parameters:
index -

getLanguage

public final String getLanguage()
Specified by:
getLanguage in interface SearchCollection
Returns:
Returns the language.
See Also:
SearchCollection.getLanguage()

purge

public final IndexResult purge()
                        throws SearchException
Description copied from interface: SearchCollection
purge a collection

Specified by:
purge in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.purge()

delete

public final IndexResult delete()
                         throws SearchException
Description copied from interface: SearchCollection
delete the collection

Specified by:
delete in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.delete()

deleteIndex

public final IndexResult deleteIndex(PageContext pc,
                                     String key,
                                     short type,
                                     String queryName)
                              throws SearchException
Description copied from interface: SearchCollection
delete a Index from collection

Specified by:
deleteIndex in interface SearchCollection
Throws:
SearchException
See Also:
SearchCollection.deleteIndex(railo.runtime.PageContext, java.lang.String, short, java.lang.String)

getPath

public final Resource getPath()
Specified by:
getPath in interface SearchCollection
Returns:
Returns the path.
See Also:
SearchCollection.getPath()

getCreated

public DateTime getCreated()
Specified by:
getCreated in interface SearchCollection
Returns:
returns when collection is created
See Also:
SearchCollection.getCreated()

getLastUpdate

public final DateTime getLastUpdate()
Specified by:
getLastUpdate in interface SearchCollection
Returns:
Returns the lastUpdate.
See Also:
SearchCollection.getLastUpdate()

getName

public final String getName()
Specified by:
getName in interface SearchCollection
Returns:
Returns the name.
See Also:
SearchCollection.getName()

getLogger

public final Log getLogger()
Specified by:
getLogger in interface SearchCollection
Returns:
Returns the logFile.
See Also:
SearchCollection.getLogger()

getSearchEngine

public final SearchEngine getSearchEngine()
Specified by:
getSearchEngine in interface SearchCollection
Returns:
Returns the searchEngine.
See Also:
SearchCollection.getSearchEngine()

created

public Object created()
Description copied from interface: SearchCollection
return time when collection was created

Specified by:
created in interface SearchCollection
Returns:
create time
See Also:
SearchCollection.created()

search

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
Description copied from interface: SearchCollection
search the collection

Specified by:
search in interface SearchCollection
qry - Query to append resuts
type - SEARCH_TYPE_EXPLICIT or SEARCH_TYPE_SIMPLE
Returns:
new startrow
Throws:
SearchException
PageException
See Also:
SearchCollection.search(railo.runtime.search.SearchData, railo.runtime.type.Query, java.lang.String, java.lang.String, short, int, int, java.lang.String, java.lang.String[])

getDirectory

public static String getDirectory(String strUrl)
                           throws MalformedURLException
Throws:
MalformedURLException

getIndexesAsQuery

public Object getIndexesAsQuery()


Copyright © 2012 Railo