Skip navigation links


com.fatwire.cs.core.search.source
Interface IndexSource


public interface IndexSource

IndexSource represent a collection of index data that will be indexed by SearchEngine. Each IndexSource will have a name which instructs SearchEngine which index that it needs to index the data to. It also contains the metadata information for the IndexSource that the SearchEngine would use


Method Summary
 void endIndexing(java.util.List<IndexRow> failed)
          This method must be called after the indexing is finished to allow data cleanup and handling of failed indexing data
 IndexSourceMetadata getConfiguration()
          Gets the metadata information for this index source.
 java.lang.Iterable<IndexRow> getDeleted()
          Gets the list of index data need to be deleted that this index source contains.
 QueryExpression getDeleteQuery()
          Gets the QueryExpression that SearchEngine could use to delete all the data that satisfy the QueryExpression.
 java.lang.Iterable<IndexRow> getModified()
          Gets the list of updated index data that this index source contains.
 java.lang.String getName()
          Gets the name of the IndexSource.
 java.lang.Iterable<IndexRow> getNew()
          Gets the list of new index data that this index source contains.
 void startIndexing()
          This method must to be called before actual indexing begins so that IndexSource would prepare the data needed

 

Method Detail

getName

java.lang.String getName()
Gets the name of the IndexSource. SearchEngine will use this name to decide which index that the data would be indexed to
Returns:
the String name

getNew

java.lang.Iterable<IndexRow> getNew()
                                    throws IndexSourceException
Gets the list of new index data that this index source contains.
Returns:
the list of new index data
Throws:
IndexSourceException - throws IndexSourceException if error met in getting the new index data

getModified

java.lang.Iterable<IndexRow> getModified()
                                         throws IndexSourceException
Gets the list of updated index data that this index source contains.
Returns:
the list of updated index data
Throws:
IndexSourceException - throws IndexSourceException if error met in getting the updated index data

getDeleted

java.lang.Iterable<IndexRow> getDeleted()
                                        throws IndexSourceException
Gets the list of index data need to be deleted that this index source contains.
Returns:
the list of index data need to be deleted
Throws:
IndexSourceException - throws IndexSourceException if error met in getting the index data

getDeleteQuery

QueryExpression getDeleteQuery()
Gets the QueryExpression that SearchEngine could use to delete all the data that satisfy the QueryExpression. We use this to allow mass clean of index data from SearchEngine without needing to store large amount of indexed data information or a seperate search operation to maintain the index
Returns:
a QueryExpression

startIndexing

void startIndexing()
                   throws IndexSourceException
This method must to be called before actual indexing begins so that IndexSource would prepare the data needed
Throws:
IndexSourceException - throws IndexSourceException if error met

endIndexing

void endIndexing(java.util.List<IndexRow> failed)
This method must be called after the indexing is finished to allow data cleanup and handling of failed indexing data
Parameters:
failed - a list of IndexRow which failed to index

getConfiguration

IndexSourceMetadata getConfiguration()
Gets the metadata information for this index source.
Returns:
the IndexSourceMetadata

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.