Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge pull request #2 from apache/add_name
Add Name to search_updated/4 and st_updated/4
  • Loading branch information
jiangphcn committed Feb 25, 2019
2 parents 390b919 + 944a7e5 commit d07e49a98d5c54aaa33946d5e4e979f7151746e9
Showing 1 changed file with 6 additions and 6 deletions.
@@ -309,15 +309,15 @@ update_ddoc_indexes(Name, #doc{}=Doc, State) ->
false ->
ok
end,
SearchUpdated = search_updated(Doc, Seq, State),
STUpdated = st_updated(Doc, Seq, State),
SearchUpdated = search_updated(Name, Doc, Seq, State),
STUpdated = st_updated(Name, Doc, Seq, State),
case {ViewUpdated, SearchUpdated, STUpdated} of
{ok, ok, ok} -> ok;
_ -> resubmit
end.

-ifdef(HAS_DREYFUS).
search_updated(Doc, Seq, State) ->
search_updated(Name, Doc, Seq, State) ->
case should_update(Doc, <<"indexes">>) of true ->
try dreyfus_index:design_doc_to_indexes(Doc) of
SIndexes -> update_ddoc_search_indexes(Name, SIndexes, Seq, State)
@@ -328,12 +328,12 @@ search_updated(Doc, Seq, State) ->
ok
end.
-else.
search_updated(_Doc, _Seq, _State) ->
search_updated(_Name, _Doc, _Seq, _State) ->
ok.
-endif.

-ifdef(HAS_HASTINGS).
st_updated(Doc, Seq, State) ->
st_updated(Name, Doc, Seq, State) ->
case should_update(Doc, <<"st_indexes">>) of true ->
try
hastings_index:design_doc_to_indexes(Doc) of
@@ -345,7 +345,7 @@ st_updated(Doc, Seq, State) ->
ok
end.
-else.
st_updated(_Doc, _Seq, _State) ->
st_updated(_Name, _Doc, _Seq, _State) ->
ok.
-endif.

0 comments on commit d07e49a

Please sign in to comment.