Skip to content

Commit

Permalink
feat: adds inner_queries
Browse files Browse the repository at this point in the history
Addthe new `inner_queries` response field in GetLogs

```json
    "inner_queries": [
        {
            "index_name": "indexName",
            "query_id": 313453231,
            "offset": 0,
            "user_token": "user1"
        }
    ]
```
  • Loading branch information
Ant-hem committed Apr 1, 2020
1 parent d62f15e commit 931c268
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/Algolia.Search/Models/Common/LogResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,36 @@ public class LogResponse
public IEnumerable<Log> Logs { get; set; }
}

/// <summary>
/// https://www.algolia.com/doc/api-reference/api-methods/get-logs/#method-response-inner_queries
/// Contains an object for each performed query with the indexName, queryID, offset, and userToken.
/// </summary>
public class InnerQueryLog
{
/// <summary>
/// The index used for the given query
/// </summary>
[JsonProperty(PropertyName = "index_name")]
public string IndexName { get; set; }

/// <summary>
/// The QueryID for the given query
/// </summary>
[JsonProperty(PropertyName = "query_id")]
public string QueryId { get; set; }

/// <summary>
/// User identifier
/// </summary>
[JsonProperty(PropertyName = "user_token")]
public string UserToken { get; set; }

/// <summary>
/// Specify the offset of the first hit to return
/// </summary>
public long? Offset { get; set; }
}

/// <summary>
/// https://www.algolia.com/doc/api-reference/api-methods/get-logs/
/// </summary>
Expand Down Expand Up @@ -115,5 +145,11 @@ public class Log
/// Index name of the log
/// </summary>
public string Index { get; set; }

/// <summary>
/// Containers for each performed query for the given call.
/// </summary>
[JsonProperty(PropertyName = "inner_queries")]
public IEnumerable<InnerQueryLog> InnerQueries { get; set; }
}
}

0 comments on commit 931c268

Please sign in to comment.