Skip to content

Commit 6569aab

Browse files
authored
Add support to inBackground parameter in ArangoSearch links (TG-208) (#359)
1 parent f425578 commit 6569aab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/view_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ func TestArangoSearchViewProperties353(t *testing.T) {
731731
},
732732
},
733733
IncludeAllFields: newBool(true),
734+
InBackground: newBool(false),
734735
},
735736
},
736737
}
@@ -765,4 +766,5 @@ func TestArangoSearchViewProperties353(t *testing.T) {
765766
require.Contains(t, analyzer.Features, driver.ArangoSearchAnalyzerFeaturePosition)
766767
require.EqualValues(t, analyzer.Properties.Locale, "en_US")
767768
require.EqualValues(t, analyzer.Properties.Case, driver.ArangoSearchCaseLower)
769+
require.Equal(t, newBool(true), link.IncludeAllFields)
768770
}

view_arangosearch.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ type ArangoSearchElementProperties struct {
408408
// Fields contains the properties for individual fields of the element.
409409
// The key of the map are field names.
410410
Fields ArangoSearchFields `json:"fields,omitempty"`
411+
// If set to true, then no exclusive lock is used on the source collection during View index creation,
412+
// so that it remains basically available. inBackground is an option that can be set when adding links.
413+
// It does not get persisted as it is not a View property, but only a one-off option
414+
InBackground *bool `json:"inBackground,omitempty"`
411415
}
412416

413417
// ArangoSearchStoreValues is the type of the StoreValues option of an ArangoSearch element.

0 commit comments

Comments
 (0)