Output Sorting Options
The V‑Spark /search
API provides multiple parameters that enable you to specify the way in which search results should be sorted. You can specify these parameters when using any /search
API output
type with the exception of the count
output type.
Possible sorting output options are the following:
- offset=NUMBER
Specifies the number of the first search result that should be returned. The
offset
is used in conjunction with thesize
option to enable you to page through search results when their number exceeds thesize
value. For example, if a search matches 500 results and you are using asize
value of 100, you would specify&offset=100
to return results 101-200, and&offset=200
to return results 201-300, and so on. The defaultoffset
value is0
.- size=NUMBER
Specifies the number of matching results that will be returned at one time. The default
size
value is100
. The maximum value forsize
is 1000.- sort=FIELD
Specifies how matching search results should be ordered when returned. Regardless of the specified
sort
FIELD
,score
is always used as a secondary sort option. The defaultsort
value isdatetime
. The following VociFIELD
s are available sort options:agent_clarity
agent_emotion
agent_gender
client_clarity
client_emotion
client_gender
datetime
diarization
duration
filename
overall_emotion
overtalk
score
silence
- sortdir=DIRECTION
Direction in which to sort output entries.
DIRECTION
should be eitherasc
for ascending order, ordesc
for descending order, based on data type. The default value isdesc
.