Keyoti Search for ASP.NET API Docs
DocumentIndex Class
API DocumentationKeyoti.SearchEngine.IndexDocumentIndex
Keyoti Search for ASP.NET 2010
Represents the document index, and provides functionality for building the index, and adding/removing documents.
Declaration Syntax
C#Visual BasicVisual C++
public class DocumentIndex
Public Class DocumentIndex
public ref class DocumentIndex
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
DocumentIndex(Configuration)
Creates a new instance of the DocumentIndex class.

AddContent(ContentCategoryRecord)
Adds a content type to the index.

AddDocument(Document)
Adds the specified document to the index.

AddDocument(Document, Boolean, Boolean) Obsolete.
Adds a document to the index

AddedDocument
Fired when a document has been added to the index, providing an opportunity to cancel.

AddingDocument
Fired when a document is about to be added to the index, providing an opportunity to cancel.

AddLocation(LocationCategoryRecord)
Adds a new location to the index.

AutoAssignDocumentContent(Boolean)
Automatically assigns the content category to documents.

AutoAssignDocumentLocation(Boolean)
Automatically assigns the location category to documents.

Build()()() Obsolete.
Indexes the documents in the 'database'. This is required before searches can be performed.

Cancel()()()
When called, will stop the build.

Cancelled
Whether the build has been cancelled.

Close()()()
Closes the index layer.

Configuration
The configuration

CreateNewDocument(DocumentRecord)
Called whenever a Document object is created, override this method to use Document subclasses.

CurrentAddingDocumentUrl
The Url of the document being added to the index.

DataAccess
The data-access layer, the type returned depends on the setting of Configuration.DbType.

DeleteDocument(String)
Convenience, calls RemoveDocument method. See remarks.

DeleteIndex(Boolean)
Deletes the contents of the index, by deleting the index files.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetContentCategoryRecords()()()
Gets all content category records from the index.

GetDocument(Uri)
Gets a Document from the data-access that has a URI equal to documentUri.

GetDocumentID(Uri)
Returns the document ID of the document specified by uri

GetDocumentsFromIndexableSource(IndexableSourceRecord)
Get's an ArrayList of Document objects belonging to (imported from) an IndexableSource.

GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetImportSample(IndexableSourceRecord, DataSet, Int32, LinkBasedImportSampler..::.InvokeMethod)
Produces a sample DataTable of data that will be imported from the indexableSourceRecord using dataSource and places it in the DataSet ds as the first item.

GetIndexableSourceForRecord(IndexableSourceRecord)
Creates the IIndexableSource object (eg. DataSetBasedSource) for the specified indexableSourceRecord.

GetIndexableSourceRecord(SourceType, String, String)
Gets an IndexableSourceRecord from the index that matches the type, location and query.

GetIndexableSourceRecords()()()
Gets a collection of indexable sources

GetIndexedDocuments()()()
Gets all the indexed documents from the document table, as an ArrayList of Document objects

GetLastIndexDate()()() Obsolete.
Return the date when last index was performed

GetLocationCategoryRecords()()()
Gets all location category records from the index.

GetNumberOfDocumentsFromIndexableSource(IndexableSourceRecord)
Gets the number of documents that have been imported from the source

GetState()()()
Gets the state of the index.

GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
GetWordVariations(Word, Configuration)
Returns list of string objects with variations (lemmas) for a word, empty list if none found.

Import(IndexableSourceRecord)
Imports the documents from an indexable source into the document index and returns a collection of imported Uri objects.

Import(IndexableSourceRecord, IIndexableSource)
Imports the documents from an indexable source into the document index and returns a collection of imported Uri objects

ImportCustomDataSet(String, String, String, String)
Convenience method to import data from a DLL using the Import method.

ImportDatabase(SourceType, String, String, String, String)
Convenience method to import data from a database using the Import method.

ImportFileSystemFolder(String, String, ArrayList, ArrayList, Boolean)
Convenience method to import documents from a virtual folder using the Import method.

ImportSampleDataTableColumnsFinalized
Fired when the DataTable used for the import sample has it's columns finalized.

ImportWebsite(String)
Convenience method to crawl and import a website using the Import method.

IsClosed
Whether this object has been closed.

IsContentUsed(String)
Returns true if contentName is used by at least one document

IsDocumentToBeIndexed(Document)
Determines if a document should be indexed.

IsLocationUsed(String)
Returns true if locationName is used by at least one document

IsLocked()()()
Whether the current index is locked (preventing operations other than search).

ItemsImported
The number of items (documents, records, files, etc) that have been imported since the last call to Import.

MarkIndexValid(Boolean)
Marks the current document index as valid or not.

MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
OccurrenceCount
The number of occurrences indexed during the build.

OnImportSampleDataTableColumnsFinalized(EventArgs)
Called whenever a readerException is caught

OnReaderExceptionOccurred(ReaderExceptionOccurredEventArgs)
Called whenever a readerException is caught

Open()()() Obsolete.
Opens the index for use.

Optimize()()()
Reorganizes index files for optimal search speed.

OptimizeProgress
The current percent progress of the optimize operation. (0-100)

PercentItemsDeleted
The percentage of items (documents, records, files, etc) that have been delete since the last call to RemoveSource.

ReaderExceptionOccurred
Fired whenever the (web) reader encounters a network exception, eg. 404 (this can be useful for identifying dead links)

RegisterDataSetBasedSource(Int32, DataSetBasedSource)
Registers a DataSetBasedSource for use by the document reader.

ReimportIndexableSources()()()
Reimports all indexed sources.

RemoveContent(String)
Removes a content type from the 'database' if the type is unused, otherwise throws an exception.

RemoveDocument(Document)
Removes the document specified from the database. See remarks.

RemoveDocument(String)
Removes the document specified by its Uri from the database

RemoveLocation(String)
Removes a location from the 'database' if the location is unused, otherwise throws an exception.

RemoveSource(IndexableSourceRecord)
Removes the indexable data source passed as argument from database, and all of it's documents.

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
UpdateDocument(DocumentRecord) Obsolete.
Updates the content/location categories stored for a document in the index

UpdateDocumentCategories(Document)
Updates location/content categories assigned in DocumentRecord to the index.

Remarks
This class imports records from any IndexableSource, represented by an IndexableSourceRecord. An IndexableSource can be a source of data such as;
  • Web-site - WebSiteBasedSourceRecord
  • MSSQL, Oracle, or OLE database - DatabaseBasedIndexableSourceRecord
  • File-system directory - FileSystemFolderBasedSourceRecord
  • Custom DataSet - CustomDataSetBasedIndexableSourceRecord
This class is typically used as;
CopyC#
documentIndex = new DocumentIndex(configuration)
documentIndex.Import(...)
documentIndex.Close()
The Import method can be used to either, import a new set of documents, or to update an existing set. For example, Import can be used first to import a web-site (which will be crawled). When it does this it saves the IndexableSourceRecord into the index. The IndexableSourceRecord can be passed to Import later and will cause the method to update the source (adding new documents and removing now missing documents).
Inheritance Hierarchy
Object
DocumentIndex

Assembly: Keyoti2.SearchEngine.Core (Module: Keyoti2.SearchEngine.Core) Version: 2010.4.1.609