Represents the document index, and provides functionality for building the index, and adding/removing documents.
Declaration Syntax
C# | Visual Basic |
public class DocumentIndex
Public Class DocumentIndex
Members
All Members | Constructors | Methods | Properties | Events | |
Icon | Member | Description |
---|---|---|
DocumentIndex(Configuration) |
Creates a new instance of the DocumentIndex class.
| |
AddContent(ContentCategoryRecord) |
Adds a content type to the index.
| |
AddDocument(Document, String) |
Adds the specified document to the index (synchronously - use AsynchronousQueue.QueueForIndexing for asynchronous usage).
| |
AddDocument(Document) |
Adds the specified document to the index (synchronously - use AsynchronousQueue.QueueForIndexing for asynchronous usage).
| |
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.
| |
AddSecurityGroup(SecurityGroupRecord) |
Add a new security group to the index.
| |
AutoAssignDocumentContent(Boolean) |
Automatically assigns the content category to documents.
| |
AutoAssignDocumentLocation(Boolean) |
Automatically assigns the location category to documents.
| |
AutoAssignDocumentSecurityGroup(Boolean) |
Automatically assigns the security groups to documents.
| |
Cancel()()()() |
When called, will stop the import.
| |
Cancelled |
Whether the build has been cancelled.
| |
Close()()()() |
Closes the index layer.
| |
Closed |
Fired when the document index is closed.
| |
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 try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Flush()()()() |
Flushes any buffered operations out to the disk.
| |
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
| |
GetNumberOfIndexedDocuments()()()() |
The number of documents in the index.
| |
GetSecurityGroupRecord(String) |
Gets all security group records from the index.
| |
GetSecurityGroupRecords()()()() |
Gets all security group records from the index.
| |
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.
| |
IsIndexDirectoryLocked(Configuration) |
Checks if the index directory is locked, which is typically true if there is an indexing operation or the indexing
process crashed.
| |
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).
| |
IsPaused |
Whether the import is paused.
| |
IsSecurityGroupUsed(String) |
Returns true if the named security group is used by at least one document.
| |
ItemsImported |
The number of items (documents, records, files, etc) that have been imported since the last call to Import.
| |
ItemsToImportTotal |
If available, the total number of items (documents, records, files, etc) that will be imported, otherwise returns -1.
| |
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)
| |
Pause()()()() |
Pauses the import.
| |
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, Boolean) |
Removes a content type from the index if the type is unused, otherwise throws an exception.
| |
RemoveContent(String) |
Removes a content type from the index 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, Boolean) |
Removes a location from the index if the location is unused, otherwise throws an exception.
| |
RemoveLocation(String) |
Removes a location from the index if the location is unused, otherwise throws an exception.
| |
RemoveSecurityGroup(String) |
Removes a security group from the index if the group is unused, otherwise throws an exception.
| |
RemoveSecurityGroup(String, Boolean) |
Removes a security group from the index if the group is unused, otherwise throws an exception.
| |
RemoveSource(IndexableSourceRecord) |
Removes the indexable data source passed as argument from database, and all of it's documents.
| |
Resume()()()() |
Resumes a paused import.
| |
ToString()()()() | Returns a string that represents the current object. (Inherited from Object.) | |
UnlockIndexDirectory(String) |
Forcefully unlocks the index directory specified. Only use if certain that other processes are not using the index.
| |
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.
| |
UpdateDocumentSecurityGroups(Document) |
Updates the security group assigned in DocumentRecord to the index.
| |
UpdateIndexableSourceRecord(IndexableSourceRecord) |
Updates the IndexableSourceRecord in the index, the ID property must be set.
|
Remarks
This class imports records from any IndexableSource, represented by an IndexableSourceRecord. An IndexableSource can be
a source of data such as;
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).
- Web-site - WebSiteBasedSourceRecord
- MSSQL, Oracle, or OLE database - DatabaseBasedIndexableSourceRecord
- File-system directory - FileSystemFolderBasedSourceRecord
- Custom DataSet - CustomDataSetBasedIndexableSourceRecord
Copy | |
---|---|
documentIndex = new DocumentIndex(configuration)
documentIndex.Import(...)
documentIndex.Close() |
Inheritance Hierarchy
Object | |
DocumentIndex |
Assembly: Keyoti4.SearchEngine.Core (Module: Keyoti4.SearchEngine.Core.dll) Version: 2022.8.22.610