summaryrefslogtreecommitdiff
path: root/src/couch_views/src/couch_views_sup.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couch_views/src/couch_views_sup.erl')
-rw-r--r--src/couch_views/src/couch_views_sup.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/couch_views/src/couch_views_sup.erl b/src/couch_views/src/couch_views_sup.erl
index 7a72a1f33..d84ec9f16 100644
--- a/src/couch_views/src/couch_views_sup.erl
+++ b/src/couch_views/src/couch_views_sup.erl
@@ -28,6 +28,7 @@
start_link() ->
+ ok = register_views_index(),
Arg = case fabric2_node_types:is_type(view_indexing) of
true -> normal;
false -> builds_disabled
@@ -50,6 +51,13 @@ init(builds_disabled) ->
{ok, {flags(), []}}.
+register_views_index() ->
+ case fabric2_node_types:is_type(api_frontend) of
+ true -> couch_views:register_index();
+ false -> ok
+ end.
+
+
flags() ->
#{
strategy => one_for_one,