View Methods

    Drops a View and all its data.

    Examples

    Drop a View:

    Show execution results

    Hide execution results

    1. [ArangoView 91893, "example" (type arangosearch)]
    2. [ArangoView 91893, "example" (type arangosearch)]
    3. null

    Query Name

    view.name()

    Returns the name of the View.

    Examples

    Get View name:

    1. arangosh> v = db._view("demoView");
    2. arangosh> v.name();

    Show execution results

    Hide execution results

    1. [ArangoView 108, "demoView" (type arangosearch)]
    2. 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

    1. [ArangoView 91919, "example" (type arangosearch)]
    2. example
    3. exampleRenamed

    Query Type

    view.type()

    Returns the type of the View.

    Examples

    Get View type:

    1. arangosh> v = db._view("demoView");
    2. arangosh> v.type();

    Show execution results

    Hide execution results

    1. [ArangoView 108, "demoView" (type arangosearch)]
    2. arangosearch

    view.properties()

    Examples

    Get View properties:

    Show execution results

    Hide execution results

    1. [ArangoView 108, "demoView" (type arangosearch)]
    2. {
    3. "writebufferIdle" : 64,
    4. "writebufferSizeMax" : 33554432,
    5. "consolidationPolicy" : {
    6. "type" : "tier",
    7. "segmentsBytesFloor" : 2097152,
    8. "segmentsBytesMax" : 5368709120,
    9. "segmentsMax" : 10,
    10. "segmentsMin" : 1,
    11. "minScore" : 0
    12. },
    13. "primarySort" : [ ],
    14. "storedValues" : [ ],
    15. "writebufferActive" : 0,
    16. "consolidationIntervalMsec" : 1000,
    17. "cleanupIntervalStep" : 2,
    18. "commitIntervalMsec" : 1000,
    19. "links" : {
    20. },
    21. "primarySortCompression" : "lz4"
    22. }

    Modify Properties

    view.properties(new-properties, partialUpdate)

    Modifies the properties of the view. The format of the result is specific to each of the supported .

    partialUpdate is an optional Boolean parameter (true by default) that determines how the new-properties object is merged with current View properties (adds or updates new-properties properties to current if true replaces all properties if false).

    Currently, the only supported View type is "arangosearch". See ArangoSearch View Properties.

    Examples

    Modify View properties:

    1. arangosh> v = db._view("example");
    2. arangosh> v.properties();
    3. ........> // set cleanupIntervalStep to 12
    4. ........> // add a link
    5. ........> // remove a link
    6. arangosh> v.properties({links: {demo: null}})

    Show execution results

    Hide execution results

    1. [ArangoView 91900, "example" (type arangosearch)]
    2. {
    3. "writebufferIdle" : 64,
    4. "writebufferSizeMax" : 33554432,
    5. "consolidationPolicy" : {
    6. "type" : "tier",
    7. "segmentsBytesFloor" : 2097152,
    8. "segmentsBytesMax" : 5368709120,
    9. "segmentsMax" : 10,
    10. "segmentsMin" : 1,
    11. "minScore" : 0
    12. },
    13. "primarySort" : [ ],
    14. "storedValues" : [ ],
    15. "writebufferActive" : 0,
    16. "consolidationIntervalMsec" : 1000,
    17. "cleanupIntervalStep" : 2,
    18. "commitIntervalMsec" : 1000,
    19. "links" : {
    20. },
    21. "primarySortCompression" : "lz4"
    22. }
    23. {
    24. "cleanupIntervalStep" : 12,
    25. "commitIntervalMsec" : 1000,
    26. "consolidationIntervalMsec" : 1000,
    27. "consolidationPolicy" : {
    28. "type" : "tier",
    29. "segmentsBytesFloor" : 2097152,
    30. "segmentsBytesMax" : 5368709120,
    31. "segmentsMax" : 10,
    32. "segmentsMin" : 1,
    33. "minScore" : 0
    34. },
    35. "primarySort" : [ ],
    36. "primarySortCompression" : "lz4",
    37. "storedValues" : [ ],
    38. "writebufferActive" : 0,
    39. "writebufferIdle" : 64,
    40. "writebufferSizeMax" : 33554432,
    41. "links" : {
    42. }
    43. }
    44. {
    45. "consolidationIntervalMsec" : 1000,
    46. "consolidationPolicy" : {
    47. "type" : "tier",
    48. "segmentsBytesFloor" : 2097152,
    49. "segmentsBytesMax" : 5368709120,
    50. "segmentsMax" : 10,
    51. "segmentsMin" : 1,
    52. "minScore" : 0
    53. },
    54. "primarySort" : [ ],
    55. "primarySortCompression" : "lz4",
    56. "storedValues" : [ ],
    57. "writebufferActive" : 0,
    58. "writebufferIdle" : 64,
    59. "writebufferSizeMax" : 33554432,
    60. "links" : {
    61. "demo" : {
    62. "analyzers" : [
    63. "identity"
    64. ],
    65. "fields" : {
    66. },
    67. "includeAllFields" : false,
    68. "storeValues" : "none",
    69. "trackListPositions" : false
    70. }
    71. }
    72. }
    73. {
    74. "cleanupIntervalStep" : 12,
    75. "commitIntervalMsec" : 1000,
    76. "consolidationIntervalMsec" : 1000,
    77. "consolidationPolicy" : {
    78. "type" : "tier",
    79. "segmentsBytesFloor" : 2097152,
    80. "segmentsBytesMax" : 5368709120,
    81. "segmentsMax" : 10,
    82. "segmentsMin" : 1,
    83. "minScore" : 0
    84. },
    85. "primarySort" : [ ],
    86. "primarySortCompression" : "lz4",
    87. "storedValues" : [ ],
    88. "writebufferActive" : 0,
    89. "writebufferIdle" : 64,
    90. "writebufferSizeMax" : 33554432,
    91. "links" : {
    92. }