These constants control the ordering of results returned from the various search methods.
A single sort-by constant can be combined with a direction control constant using the bitwise-OR (|) operator.
sortby=S_*|S_ASC
sortby=S_*|S_DESC
| Sort-by constants cannot be combined with other sort-by constants. |
1. Sort Direction
These constants control the overall direction of the sorted results.
| Sort Constant | Description |
|---|---|
Sort ascending, i.e. low to high |
|
Sort descending, i.e. high to low |
2. Sort By
These constants control how results are ordered.
| Sort Constant | Type | Sort by | Description | Default Order |
|---|---|---|---|---|
- |
- |
Search results are ordered according to internal traversal. This is generally faster than other sorts. |
undefined |
|
int or float |
Arc (predicator) value |
Effective only for methods supporting |
Descending |
|
int |
Memory address |
Sort by terminal vertex object’s internal memory address. This may lead to faster processing of large search results in some cases. |
Ascending |
|
str |
Vertex internalid |
Sort by vertex internalid |
Ascending |
|
str |
Vertex identifier |
Sort by vertex identifier string |
Ascending |
|
int |
Vertex degree |
Sort by vertex total degree (indegree + outdegree) |
Descending |
|
int |
Vertex indegree |
Sort by vertex indegree |
Descending |
|
int |
Vertex outdegree |
Sort by vertex outdegree |
Descending |
|
float |
Vertex vector similarity |
Sort by the similarity score computed for terminal vertex vector and probe vector supplied in the query |
Descending |
|
int |
Vertex vector fingerprint hamming distance |
Sort by the fingerprint hamming distance for terminal vertex vector and probe vector supplied in the query |
Ascending |
|
float |
Generic rank score |
Sort by a rank score as computed by a rank score evaluation function (query dependent feature). When supported by a query method, the rank scoring specification must be provided in the
The |
Descending |
|
int |
Vertex created timestamp |
Sort by vertex creation time (1 second resolution) |
Ascending |
|
int |
Vertex modified timestamp |
Sort by vertex modification time (1 second resolution) |
Ascending |
|
int |
Vertex expires timestamp |
Sort by vertex expiration time (1 second resolution) |
Ascending |
|
int |
No sorting |
Similar to pyvgx.S_NONE but will complete deep traversal to gather counts and other metrics |
undefined |
|
float |
Random sorting |
The sort order will be randomized. Repeated searches will return a different random sort order each time. |
undefined |
3. pyvgx.S_NONE
pyvgx.S_NONE = 0
4. pyvgx.S_ASC
pyvgx.S_ASC = 1
5. pyvgx.S_DESC
pyvgx.S_DESC = 2
6. pyvgx.S_VAL
pyvgx.S_VAL = 16
7. pyvgx.S_ADDR
pyvgx.S_ADDR = 32
8. pyvgx.S_OBID
pyvgx.S_OBID = 48
9. pyvgx.S_ID
pyvgx.S_ID = 64
10. pyvgx.S_DEG
pyvgx.S_DEG = 80
11. pyvgx.S_IDEG
pyvgx.S_IDEG = 96
12. pyvgx.S_ODEG
pyvgx.S_ODEG = 112
13. pyvgx.S_SIM
pyvgx.S_SIM = 144
14. pyvgx.S_HAM
pyvgx.S_HAM = 128
15. pyvgx.S_RANK
pyvgx.S_RANK = 160
16. pyvgx.S_TMC
pyvgx.S_TMC = 176
17. pyvgx.S_TMM
pyvgx.S_TMM = 192
18. pyvgx.S_TMX
pyvgx.S_TMX = 208
19. pyvgx.S_NATIVE
pyvgx.S_NATIVE = 224
