![]() Otherwise, strings are sorted lexicographically. If the string starts with a number, the string is sorted numerically based on that number alone. Alphanumeric strings are sorted based on the data type of the first character.Numeric data is sorted as you would expect for numbers and the sort order is specified as ascending or descending.Punctuation strings are sorted lexicographically.Alphabetic strings are sorted lexicographically.Otherwise, the collating sequence is in lexicographical order. If the field contains on IP address values, the collating sequence is for IP addresses. If the field contains numeric values, the collating sequence is numeric. See Command types.īy default, sort tries to automatically determine what it is sorting. The sort command is a dataset processing command. str Syntax: str() Description: Interpret the values of the field as strings and order the values alphabetically. num Syntax: num() Description: Interpret the values of the field as numbers. ip Syntax: ip() Description: Interpret the values of the field as IP addresses. auto Syntax: auto() Description: Determine automatically how to sort the values of the field. Syntax: Description: The name of field to sort. Sort field options Syntax: | auto() | str() | ip() | num() Description: Options you can specify with. For each set of duplicate values in the second field, reverses the order of the corresponding values in the third field. For each set of duplicate values in the first field, reverses the order of the corresponding values in the second field. For example, if there are three fields specified, the desc argument reverses the order of the values in the first field. If multiple fields are specified, reverses the order of the values in the fields in the order in which the fields are specified. Default: 10000 desc Syntax: d | desc Description: Reverses the order of the results. Using sort 0 might have a negative impact performance, depending on how many results are returned. You can specify the count using an integer or precede the count with a label, for example limit=10. If 0 is specified, all results are returned. If no count is specified, the default limit of 10000 is used. Optional arguments Syntax: | limit= Description: Specify the number of results to return from the sorted results. When specifying more than one field, separate the field names with commas. Use a minus sign (-) for descending order and a plus sign (+) for ascending order. Description: List of fields to sort by and the sort order. ![]() ![]() See the count argument for more information. If the number 0 is specified, all of the results are returned. If no number is specified, the default limit of 10000 is used. If the first argument to the sort command is a number, then at most that many results are returned, in order. Results missing a given field are treated as having the smallest or largest possible value of that field if the order is descending or ascending, respectively. The sort command sorts all of the results by the specified fields. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |