   USING btree
   (node_name varchar_pattern_ops, corpus_ref);
 
-CREATE INDEX idx__facts_node_name2__:id
-  ON facts_:id
-  USING btree
-  (node_name varchar_pattern_ops, text_ref);
-
-
 CREATE INDEX idx__facts_node_namespace__:id
   ON facts_:id
   USING btree
   (node_namespace varchar_pattern_ops, corpus_ref);
-
-CREATE INDEX idx__facts_node_namespace2__:id
-  ON facts_:id
-  USING btree
-  (node_namespace varchar_pattern_ops, text_ref);
-
 
 CREATE INDEX idx__facts_parent__:id
   ON facts_:id

  USING btree
  (span varchar_pattern_ops, corpus_ref);

CREATE INDEX idx__facts_span2__:id
  ON facts_:id
  USING btree
  (span varchar_pattern_ops, text_ref);


CREATE INDEX idx__facts_token_index__:id
  ON facts_:id
  USING btree
  (token_index, text_ref);

CREATE INDEX idx__facts_corpus_ref_index__:id
  ON facts_:id

  (text_ref);

----- 2nd query
CREATE INDEX idx__2nd_query_:id ON facts_:id (corpus_ref, text_ref,left_token, right_token);

-- optimize the select distinct
CREATE INDEX idx_distinct_helper_:id ON facts_:id(id, corpus_ref, text_ref, left_token, right_token);

-- allow simple searches (node, tok etc)
CREATE INDEX idx__sample_n__:id ON facts_:id(n_sample);
