anchor.diff:          _ -> Partial
       end.
   
  --spec create_starting_stu(atom(), integer(), atom(), binary()) -> tuple().
  -create_starting_stu(ivk, ID, head_match, SearchTerm)        -> {ID, SearchTerm, ?SMALLEST_TERM};
  -create_starting_stu(ivk, ID, range_match, {RangeStart, _})  -> {ID, RangeStart, ?SMALLEST_TERM};
  -create_starting_stu(ivk, ID, _MatchType, _SearchTerm)       -> {ID, ?SMALLEST_TERM, ?SMALLEST_TERM};
  -create_starting_stu(_Type, ID, head_match, SearchTerm)      -> {ID, SearchTerm};
  -create_starting_stu(_Type, ID, range_match, {RangeStart, _})-> {ID, RangeStart};
  -create_starting_stu(_Type, ID, _MatchType, _SearchTerm)     -> {ID, ?SMALLEST_TERM}.
  +-spec create_starting_stu(atom(), integer(), atom(), binary(), <<>> | tuple()) -> tuple().
  +create_starting_stu(ivk, ID, head_match, SearchTerm, <<>>)        -> {ID, SearchTerm, ?SMALLEST_TERM};
  +create_starting_stu(ivk, ID, range_match, {RangeStart, _}, <<>>)  -> {ID, RangeStart, ?SMALLEST_TERM};
  +create_starting_stu(ivk, ID, _MatchType, _SearchTerm, <<>>)       -> {ID, ?SMALLEST_TERM, ?SMALLEST_TERM};
  +create_starting_stu(_Type, ID, head_match, SearchTerm, <<>>)      -> {ID, SearchTerm};
  +create_starting_stu(_Type, ID, range_match, {RangeStart, _}, <<>>)-> {ID, RangeStart};
  +create_starting_stu(_Type, ID, _MatchType, _SearchTerm, <<>>)     -> {ID, ?SMALLEST_TERM};
  +create_starting_stu(_Type, _ID, _MatchType, _SearchTerm, FromStu) -> FromStu.
  +
   
   -spec preview_expand_kl(atom(), tuple(), list(), list(), fun()) -> list().
   preview_expand_kl(_Type, _Stu, [], _SearchTerm, _Iff) -> [];
  
positive.code: 
  -spec preview_regexp_init(atom(), integer(), atom(), term(), integer(), function(), tuple() | <<>>) -> list().
  preview_regexp_init(IndexTable, ID, Type, SearchTerm, Limit, Iff, FromStu) ->
      StartingStu = if FromStu == <<>> -> create_starting_stu(Type, ID, re_match, SearchTerm);
                       true -> FromStu
      end,
      ReplacedStar = binary:replace(SearchTerm, [<<"*">>], <<"%">>, [global]),
      ReplacedMark = binary:replace(ReplacedStar, [<<"?">>], <<"_">>, [global]),
      Pattern = imem_sql_funs:like_compile(ReplacedMark),
  
negative.code:             ResultHead
      end;
  preview_execute(IndexTable, ID, Type, [body_match | _SearchStrategies], SearchTerm, Limit, Iff, PrevStrategy, FromStu) ->
      StartingStu = create_starting_stu(Type, ID, body_match, SearchTerm, FromStu),
      IffNotAdded = add_filter_duplicated(PrevStrategy, SearchTerm, Iff),
      {atomic, ResultBody} =
          imem_if:transaction(fun() -> preview_body(IndexTable, ID, Type, SearchTerm, StartingStu, Limit, IffNotAdded) end),
  