1//  Copyright (c) 2014 Couchbase, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// 		http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package bleve
16
17// An IndexAlias is a wrapper around one or more
18// Index objects.  It has two distinct modes of
19// operation.
20// 1.  When it points to a single index, ALL index
21// operations are valid and will be passed through
22// to the underlying index.
23// 2.  When it points to more than one index, the only
24// valid operation is Search.  In this case the
25// search will be performed across all the
26// underlying indexes and the results merged.
27// Calls to Add/Remove/Swap the underlying indexes
28// are atomic, so you can safely change the
29// underlying Index objects while other components
30// are performing operations.
31type IndexAlias interface {
32	Index
33
34	Add(i ...Index)
35	Remove(i ...Index)
36	Swap(in, out []Index)
37}
38