Assembly file faind.dll can be downloaded here. It may be necessary to download compiled dictionary for advanced functions (morphological and syntax analysis) to become available. It is possible to compile .NET component from the source codes (this project is real open source) - read the instructions.
This is FULL SCALE local search engine, including on-the-fly unpacking and internet scanning (see the list of actual features). You can use it free-of-charge (read license conditions). If ordinary MS Windows DLL is more suited then use Win32 DLL component.
1. Class Solarix::Search_Engine::Engine
It is a interface wrapper for the search engine. All API functions below are the methods of this class.
2. Execute the query string and return the search results
String* Engine::Search( String *query_str )
It executes the query string and returns the search results (XML or HTML formatted text)
Arguments:
query_str - query string (see reference manual)
Returns:
The string that contains the search result. It can be XML or HTML formatted text (see method Generate_HTML below).
3. Read the configuration parameters for the search engine from ini file
void Engine::Read_Ini( String *ini_filename )
File with given name is parsed as FAIND engine ini file.
Arguments:
ini_filename - name of ini file
Effects:
Search engine behavior is changed after the the successful parsing of ini file, so this method has "global effect".
4. Start logging search engine activity into the log file
void Engine::Open_Log_File( String *logfilename )
Arguments:
logfilename - the name of log file to create
Effects:
All activity of the search engine is written in text file from that moment. It decreases the efficiency of the engine drastically but can help to find the cause of failures.
5. Set the format of search result page to HTML
void Generate_Html()
Effects:
By default the format of results is XML. Use this method when HTML format is preferred.
6. Do not generate implicit result dataset
void Dont_Generate_Results()
Effects:
The search engine is created XML or HTML results by default and returns it as text string. If another format is required (see result formats) then command line must contain explicit options to build result file.
The only useful class of faind.dll is named Engine (declared in namespace Solarix.Search_Engine). It is highest level wrapper for search engine with simple API.
Search query can be executed in these three steps.
1. Create object of class Engine (namespace Solarix.Search_Engine).
2. Query is constructed as string with the same syntax as console search tool FAIND accepts. This string (object of class System.String) is passed to method Engine.Search.
3. Method Engine.Search is invoked. It returns string that contains result in XML format (read here).
Please do not forget to download compiled dictionary to perform advanced search with options -wordforms and -aa.
Delegate can be used to control the progress of searching. Use field Engine.user_handle to store delegate (see sample).
The principles of interaction between the user code and search engine are simple and clear - read about it here.
You can change the behavior the search engine and compile your own version of .NET assembly - read the compilation guide.
© Mental Computing 2009
|
|
last change 01-Jul-10 |