View Methods

    Drops a View and all its data.

    Examples

    Drop a View:

    Show execution results

    Hide execution results

    1. [ArangoView 88719, "example" (type arangosearch)]
    2. [ArangoView 88719, "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 99, "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 88741, "example" (type arangosearch)]
    2. example
    3. exampleRenamed

    Query 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 99, "demoView" (type arangosearch)]
    2. arangosearch

    view.properties()

    Examples

    Get View properties:

    Show execution results

    Hide execution results

    1. [ArangoView 99, "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. "writebufferActive" : 0,
    15. "consolidationIntervalMsec" : 10000,
    16. "cleanupIntervalStep" : 2,
    17. "commitIntervalMsec" : 1000,
    18. "links" : {
    19. }
    20. }

    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:

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

    Show execution results

    Hide execution results

    1. [ArangoView 88725, "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. "writebufferActive" : 0,
    15. "consolidationIntervalMsec" : 10000,
    16. "cleanupIntervalStep" : 2,
    17. "commitIntervalMsec" : 1000,
    18. "links" : {
    19. }
    20. }
    21. {
    22. "cleanupIntervalStep" : 12,
    23. "commitIntervalMsec" : 1000,
    24. "consolidationIntervalMsec" : 10000,
    25. "consolidationPolicy" : {
    26. "type" : "tier",
    27. "segmentsBytesFloor" : 2097152,
    28. "segmentsBytesMax" : 5368709120,
    29. "segmentsMax" : 10,
    30. "segmentsMin" : 1,
    31. "minScore" : 0
    32. },
    33. "primarySort" : [ ],
    34. "writebufferActive" : 0,
    35. "writebufferIdle" : 64,
    36. "writebufferSizeMax" : 33554432,
    37. "links" : {
    38. }
    39. }
    40. {
    41. "cleanupIntervalStep" : 12,
    42. "consolidationIntervalMsec" : 10000,
    43. "consolidationPolicy" : {
    44. "type" : "tier",
    45. "segmentsBytesFloor" : 2097152,
    46. "segmentsBytesMax" : 5368709120,
    47. "segmentsMax" : 10,
    48. "segmentsMin" : 1,
    49. "minScore" : 0
    50. },
    51. "primarySort" : [ ],
    52. "writebufferActive" : 0,
    53. "writebufferIdle" : 64,
    54. "writebufferSizeMax" : 33554432,
    55. "links" : {
    56. "demo" : {
    57. "analyzers" : [
    58. "identity"
    59. ],
    60. "fields" : {
    61. },
    62. "includeAllFields" : false,
    63. "storeValues" : "none",
    64. "trackListPositions" : false
    65. }
    66. }
    67. }
    68. {
    69. "cleanupIntervalStep" : 12,
    70. "commitIntervalMsec" : 1000,
    71. "consolidationIntervalMsec" : 10000,
    72. "consolidationPolicy" : {
    73. "type" : "tier",
    74. "segmentsBytesFloor" : 2097152,
    75. "segmentsBytesMax" : 5368709120,
    76. "segmentsMax" : 10,
    77. "segmentsMin" : 1,
    78. "minScore" : 0
    79. },
    80. "primarySort" : [ ],
    81. "writebufferActive" : 0,
    82. "writebufferIdle" : 64,
    83. "writebufferSizeMax" : 33554432,
    84. "links" : {
    85. }