/*
Kooboo is a content management system based on ASP.NET MVC framework. Copyright 2009 Yardi Technology Limited.
This program is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see http://www.kooboo.com/gpl3/.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Everest.Search.Convertor;
namespace Everest.Search{
public interface IIndexer : IDisposable
{
/// <summary>
/// use the configuration in the search.config
/// </summary>
/// <param name="type">The type.</param>
void Open(Type type);
/// <summary>
/// Opens the specified type.
/// </summary>
/// <param name="type">The type.</param>
/// <param name="primaryField">The primary field.</param>
void Open(Type type, string primaryField);
/// <summary>
/// Priority-of-use the configuration .
/// </summary>
/// <param name="type">The type.</param>
/// <param name="directory">The directory.</param>
/// <param name="primaryField">The primary field.</param>
/// <param name="documentConvertor">The document convertor.</param>
/// <param name="create">if set to <c>true</c> [create].</param>
void Open(Type type, string directory, string primaryField, IDocumentConvertor documentConvertor,bool create);
/// <summary>
/// Adds the document.
/// priority to use configuration
/// </summary>
/// <param name="o">The o.</param>
void AddDocument(object o);
/// <summary>
/// Updates the document.
/// delete old document if the document exists
/// or add it.
/// </summary>
/// <param name="o">The o.</param>
void UpdateDocument(object o);
/// <summary>
/// Deletes the document.
/// </summary>
/// <param name="primaryValue">The primary value.</param>
void DeleteDocument(string primaryValue);
/// <summary>
/// Closes this instance.
/// </summary>
void Close();
/// <summary>
/// Gets the directory.
/// </summary>
/// <value>The directory.</value>
string Directory { get; }
}
}
|