sphinx-searchHow to use query_log_format in SphinxSearch?
SphinxSearch supports a query log format which can be used to log queries and their results. This can be enabled by setting the query_log_format
option in the Sphinx configuration file.
Example code
query_log_format = query_time:%T\tquery_time_total:%Tt\tquery:%q\tmatches:%m\twords:%w\tdocs:%d
This will log the query time, total query time, query string, number of matches, number of words, and number of documents.
Code explanation
query_time
: The time taken to execute the queryquery_time_total
: The total time taken to execute the queryquery
: The query stringmatches
: The number of matches foundwords
: The number of words in the querydocs
: The number of documents returned
Helpful links
More of Sphinx Search
- How to use regexp_filter in SphinxSearch?
- How to use SphinxSearch with PHP?
- How to use sql_attr_float in SphinxSearch?
- How to reload the configuration in SphinxSearch?
- How to configure memory usage in SphinxSearch?
- How to use forward slash in SphinxSearch?
- How to delete data from a realtime index in SphinxSearch?
- How to query a specific index in SphinxSearch?
- How to offset results in SphinxSearch?
- How to use the MySQL protocol in SphinxSearch?
See more codes...