#include "libMRML/include/mrml_const.h"#include "libMRML/include/CXMLElement.h"#include "libGIFTAcInvertedFile/include/CAcIFFileSystem.h"Go to the source code of this file.
Functions | |
| CMutex * | gMutex (new CMutex()) |
| main (int argc, char **argv) | |
| CMutex* gMutex | ( | new | CMutex() | ) |
| main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 41 of file generateInvertedFile.cc.
References CXMLElement::addAttribute(), mrml_const::collection, mrml_const::cui_base_dir, mrml_const::cui_feature_description_location, mrml_const::cui_feature_file_location, mrml_const::cui_generate_inverted_file, mrml_const::cui_inverted_file_location, and mrml_const::cui_offset_file_location.
00042 { 00043 00044 if(argc==2){ 00045 /* reading the parameters */ 00046 string lPrefix(argv[1]); 00047 string lURL2FTS(lPrefix+"/url2fts.xml"); 00048 string lFeatureDescription(lPrefix+"/InvertedFileFeatureDescription.db"); 00049 00050 cout << "Creating an inverted file using the files" 00051 << lPrefix << endl 00052 << lURL2FTS << endl 00053 << lFeatureDescription << endl 00054 << endl 00055 << flush; 00056 00057 CXMLElement lElement(mrml_const::collection, 00058 0); 00059 00060 lElement.addAttribute(mrml_const::cui_base_dir, 00061 lPrefix); 00062 lElement.addAttribute(mrml_const::cui_feature_file_location, 00063 "url2fts.xml"); 00064 lElement.addAttribute(mrml_const::cui_feature_description_location, 00065 "InvertedFileFeatureDescription.db"); 00066 lElement.addAttribute(mrml_const::cui_inverted_file_location, 00067 "InvertedFile.db"); 00068 lElement.addAttribute(mrml_const::cui_offset_file_location, 00069 "InvertedFileOffset.db"); 00070 lElement.addAttribute(mrml_const::cui_generate_inverted_file, 00071 "yes"); 00072 00073 CAcIFFileSystem lAccessor(lElement); 00074 00075 if(lAccessor){ 00076 cout << "GENERATED inverted file" 00077 << endl 00078 << flush; 00079 00080 }else{ 00081 cout << "ERROR in generating inverted file"; 00082 } 00083 }else{ 00084 00085 cout << "USAGE: " 00086 << argv[0] 00087 << " " 00088 << "[inverted file directory]"; 00089 00090 00091 } 00092 }
1.5.6