// OpenDocument(empty_texts): it starts the construction of the data structure for\r
// the XML document. Parameter empty_texts indicates whether we index empty texts\r
// in document or not. Returns a non-zero value upon success, NULLT in case of error.\r
-int XMLTreeBuilder::OpenDocument(bool empty_texts, int sample_rate_text, bool dtc)\r
+int XMLTreeBuilder::OpenDocument(bool empty_texts, \r
+ int sample_rate_text,\r
+ bool dtc,\r
+ TextCollectionBuilder::index_type_t index_type)\r
{\r
npar = 0;\r
parArraySize = 1;\r
disable_tc = dtc;\r
-\r
+ text_index_type = index_type;\r
STARTTIMER();\r
\r
par_aux = (pb *)umalloc(sizeof(pb)*parArraySize);\r
if (disable_tc)\r
TextBuilder = 0;\r
else \r
- TextBuilder = TextCollectionBuilder::create((unsigned)sample_rate_text, TextCollectionBuilder::index_type_default);\r
+ TextBuilder = TextCollectionBuilder::create((unsigned)sample_rate_text, index_type);\r
+\r
Text = 0;\r
empty_texts_aux = (unsigned int *)ucalloc(sizeof(unsigned int),1);\r
eta_size = sizeof(unsigned int);\r
empty_texts_aux, // freed by the constructor\r
tags_aux, //freed by the constructor\r
Text,\r
- disable_tc);\r
+ disable_tc,\r
+ text_index_type);\r
return T; \r
}\r
\r