Add EmptyText(id) method which checks if the text
[SXSI/TextCollection.git] / CSA.cpp
diff --git a/CSA.cpp b/CSA.cpp
index 754dfa8..db96b4b 100644 (file)
--- a/CSA.cpp
+++ b/CSA.cpp
@@ -209,6 +209,11 @@ void CSA::MakeStatic()
     maketables();
 }
 
+bool CSA::EmptyText(DocId k) const
+{
+  assert(k < (DocId)textLength.size());
+  return (1 == textLength[k].first);
+}
 
 uchar* CSA::GetText(DocId k) const
 {