View Methods
Drops a View and all its data.
Examples
Drop a View:
Show execution results
Hide execution results
- [ArangoView 88719, "example" (type arangosearch)]
- [ArangoView 88719, "example" (type arangosearch)]
- null
Query Name
view.name()
Returns the name of the View.
Examples
Get View name:
- arangosh> v = db._view("demoView");
- arangosh> v.name();
Show execution results
Hide execution results
- [ArangoView 99, "demoView" (type arangosearch)]
- demoView
view.rename(new-name)
If renaming fails for any reason, an error is thrown.
The rename method is not available in clusters.
Examples
Show execution results
Hide execution results
- [ArangoView 88741, "example" (type arangosearch)]
- example
- exampleRenamed
Query Type
Returns the type of the View.
Examples
Get View type:
- arangosh> v = db._view("demoView");
- arangosh> v.type();
Show execution results
Hide execution results
- [ArangoView 99, "demoView" (type arangosearch)]
- arangosearch
view.properties()
Examples
Get View properties:
Show execution results
Hide execution results
- [ArangoView 99, "demoView" (type arangosearch)]
- {
- "writebufferIdle" : 64,
- "writebufferSizeMax" : 33554432,
- "consolidationPolicy" : {
- "type" : "tier",
- "segmentsBytesFloor" : 2097152,
- "segmentsBytesMax" : 5368709120,
- "segmentsMax" : 10,
- "segmentsMin" : 1,
- "minScore" : 0
- },
- "primarySort" : [ ],
- "writebufferActive" : 0,
- "consolidationIntervalMsec" : 10000,
- "cleanupIntervalStep" : 2,
- "commitIntervalMsec" : 1000,
- "links" : {
- }
- }
Modify Properties
view.properties(new-properties, partialUpdate)
Modifies the properties of the view. The format of the result is specific toeach of the supported .
partialUpdate is an optional Boolean parameter ( by default) thatdetermines how the new-properties object is merged with current View properties(adds or updates new-properties properties to current if true
replaces allproperties if false
).
Currently, the only supported View type is . SeeArangoSearch View Properties.
Examples
Modify View properties:
- arangosh> v = db._view("example");
- arangosh> v.properties();
- ........> // set cleanupIntervalStep to 12
- arangosh> v.properties({cleanupIntervalStep: 12});
- arangosh> v.properties({links: {demo: {}}})
- ........> // remove a link
- arangosh> v.properties({links: {demo: null}})
Show execution results
Hide execution results
- [ArangoView 88725, "example" (type arangosearch)]
- {
- "writebufferIdle" : 64,
- "writebufferSizeMax" : 33554432,
- "consolidationPolicy" : {
- "type" : "tier",
- "segmentsBytesFloor" : 2097152,
- "segmentsBytesMax" : 5368709120,
- "segmentsMax" : 10,
- "segmentsMin" : 1,
- "minScore" : 0
- },
- "primarySort" : [ ],
- "writebufferActive" : 0,
- "consolidationIntervalMsec" : 10000,
- "cleanupIntervalStep" : 2,
- "commitIntervalMsec" : 1000,
- "links" : {
- }
- }
- {
- "cleanupIntervalStep" : 12,
- "commitIntervalMsec" : 1000,
- "consolidationIntervalMsec" : 10000,
- "consolidationPolicy" : {
- "type" : "tier",
- "segmentsBytesFloor" : 2097152,
- "segmentsBytesMax" : 5368709120,
- "segmentsMax" : 10,
- "segmentsMin" : 1,
- "minScore" : 0
- },
- "primarySort" : [ ],
- "writebufferActive" : 0,
- "writebufferIdle" : 64,
- "writebufferSizeMax" : 33554432,
- "links" : {
- }
- }
- {
- "cleanupIntervalStep" : 12,
- "consolidationIntervalMsec" : 10000,
- "consolidationPolicy" : {
- "type" : "tier",
- "segmentsBytesFloor" : 2097152,
- "segmentsBytesMax" : 5368709120,
- "segmentsMax" : 10,
- "segmentsMin" : 1,
- "minScore" : 0
- },
- "primarySort" : [ ],
- "writebufferActive" : 0,
- "writebufferIdle" : 64,
- "writebufferSizeMax" : 33554432,
- "links" : {
- "demo" : {
- "analyzers" : [
- "identity"
- ],
- "fields" : {
- },
- "includeAllFields" : false,
- "storeValues" : "none",
- "trackListPositions" : false
- }
- }
- }
- {
- "cleanupIntervalStep" : 12,
- "commitIntervalMsec" : 1000,
- "consolidationIntervalMsec" : 10000,
- "consolidationPolicy" : {
- "type" : "tier",
- "segmentsBytesFloor" : 2097152,
- "segmentsBytesMax" : 5368709120,
- "segmentsMax" : 10,
- "segmentsMin" : 1,
- "minScore" : 0
- },
- "primarySort" : [ ],
- "writebufferActive" : 0,
- "writebufferIdle" : 64,
- "writebufferSizeMax" : 33554432,
- "links" : {
- }