Query object is at the heart of Gaois.QueryLogger.
Query objects carry the query data that will be logged to your data store. Gaois.QueryLogger will auto-populate certain query data, such as the application host or client IP, prior to logging while other data needs to be specified by your application. All default behaviours can be overridden. The rest of this document describes the various properties available for storing your query data as well as methods that can be called on the
Guid): A unique ID that represents a specific query or group of queries. A query ID will be created automatically if not specified by your application.
string): The name of the application that executes the query. The application name will be retrieved from your configuration settings if not specified in code.
string): Relates the query to a category specified by the application. Useful if, for example, you have multiple search types within one application (optional).
string): The query term(s) or text content of the query (optional).
string): The raw query text, such as a query string or POST-ed form field (optional).
string): The application host domain, e.g. www.example.com. Will be automatically obtained from the current HTTP context if not otherwise specified.
string): The client IP address. Will be automatically obtained from the current HTTP context if not otherwise specified.
true): Records whether the query executed successfully.
int?): The query execution time in milliseconds (optional).
int?): The count of results returned by the query (optional).
DateTime): The date and time of query logging. A value will be automatically generated for this property at time of logging if not otherwise specified.
string): Record additional data in JSON format. Useful for storing application- or query-specific data in a multi-application environment, for example.
string): Returns a JSON representation of a
Query): Deserialises the provided JSON into a