Hello,
i’m using HTTP JSON request with official php API
I cannot see in docs if there is some parameter or global setting for query log format
Currently my setting is: query_log_format=sphinxql
By running any JSON request the query is logs in this format
{"index":"products","script_fields":{"in_stock":{"script":{"inline":"IF(product_in_stock>0,1,0)"}},"in_supplier_stock":{"script":{"inline":"IF(supplier_stock>0,1,0)"}},"category_order":{"script":{"inline":"integer(category_list.c1)"}}},"_source":["id"],"limit":9,"offset":0,"sort":[{"in_stock":"desc"},{"in_supplier_stock":"desc"},{"category_order":"asc"}],"options":{"max_matches":10000},"query":{"bool":{"must":[{"range":{"id":{"gte":0}}},{"in":{"ANY(categories)":[1]}},{"equals":{"product_publish":1}},{"in":{"ANY(shopper_group_visibility)":[999,5]}}],"must_not":[{"in":{"ANY(ship_code_id)":[999,1000]}},{"in":{"ANY(product_special)":[19,20,21]}}]}}}
By the first look its very difficult to understand whats is going on and how the actual query was build and executed.
Is there some global setting or parameter to log in compiled query like this for example
SELECT id, IF(product_in_stock>0,1,0) AS in_stock, IF(product_in_stock + supplier_stock>0,1,0) AS in_supplier_stock, integer(category_list.c1) as category_order FROM products WHERE ANY(categories)=1 AND product_publish=1 AND ALL(ship_code_id) NOT IN (999,1000) AND ALL(product_special) NOT IN (19,20,21) AND ANY(shopper_group_visibility) IN (5,999) ORDER BY in_stock DESC, in_supplier_stock DESC, category_order ASC LIMIT 9 OPTION max_matches=10000;
Also this format is usefull for quick query debug, i can just copy-paste this and run elswhere.