1.4.1 创建一个IndexLabel

    Method & Url
    Request Body
    1. "name": "personByCity",
    2. "base_type": "VERTEX_LABEL",
    3. "base_value": "person",
    4. "index_type": "SECONDARY",
    5. "fields": [
    6. "city"
    7. ]
    8. }
    Response Status
    1. 202
    Response Body
    1. {
    2. "index_label": {
    3. "id": 1,
    4. "base_type": "VERTEX_LABEL",
    5. "base_value": "person",
    6. "fields": [
    7. "city"
    8. ],
    9. "index_type": "SECONDARY"
    10. },
    11. "task_id": 2
    12. }

    1.4.2 获取所有的IndexLabel

    Method & Url
    Response Status
    1. 200
    Response Body
    1. {
    2. "indexlabels": [
    3. {
    4. "base_type": "VERTEX_LABEL",
    5. "base_value": "software",
    6. "name": "softwareByPrice",
    7. "fields": [
    8. "price"
    9. ],
    10. "index_type": "RANGE"
    11. },
    12. {
    13. "id": 4,
    14. "base_type": "EDGE_LABEL",
    15. "base_value": "created",
    16. "name": "createdByDate",
    17. "fields": [
    18. "date"
    19. ],
    20. "index_type": "SECONDARY"
    21. },
    22. {
    23. "id": 1,
    24. "base_value": "person",
    25. "name": "personByCity",
    26. "fields": [
    27. "city"
    28. ],
    29. },
    30. {
    31. "id": 3,
    32. "base_type": "VERTEX_LABEL",
    33. "base_value": "person",
    34. "name": "personByAgeAndCity",
    35. "fields": [
    36. "age",
    37. "city"
    38. ],
    39. "index_type": "SECONDARY"
    40. }
    41. ]
    42. }

    1.4.3 根据name获取IndexLabel

    Method & Url
    1. GET http://localhost:8080/graphs/hugegraph/schema/indexlabels/personByCity
    Response Status
    Response Body
    1. {
    2. "id": 1,
    3. "base_type": "VERTEX_LABEL",
    4. "base_value": "person",
    5. "name": "personByCity",
    6. "fields": [
    7. "city"
    8. ],
    9. "index_type": "SECONDARY"
    10. }

    1.4.4 根据name删除IndexLabel

    Method & Url
    1. DELETE http://localhost:8080/graphs/hugegraph/schema/indexlabels/personByCity
    Response Status
      Response Body