Gravatar for dwebb@habaneroconsulting.com

Question by dwebb, Jan 13, 2015 2:15 PM

Are Constant Query expressions logged?

Hello -- I'm looking at the Query logging in the CES Admin tool. My page uses the "constant query" to filter the results to a particular template; for example:

args.queryBuilder.constantExpression.add("@Model.ToCoveoFieldName("templateid") == \"{D577D74F-98E9-4ABE-BF96-255FF88C100B}\" ");

When I look at the Query logging in the CES admin tool, it appears that the constant query (cq) is not logged. The tool shows the query, the advanced query, and the disjunctive query, but does not have any checkbox to enable/disable the constant query. This limits my ability to use the tool to see the query that was actually issued.

Am I missing something? Is this something that can be added?

Cheers David

1 Reply
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, Jan 13, 2015 2:29 PM

Hi David,

The constant expressions are indeed not logged there. You can easily see it if you open your Chrome developers tools and check the network tab when the query is sent (in the preview, you'll see thats in the aq/cq/dq/q objects).

Gravatar for dwebb@habaneroconsulting.com

Comment by dwebb, Jan 13, 2015 2:54 PM

Great, thanks for the info! Is that something that could be added? It's a bit annoying to be able to see all the rest of the properties (plus useful information like paging, query duration, # of results returned) in the CES log, but then have to use a browser tool or something like Fiddler to see the cq part.

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Jan 13, 2015 2:56 PM

You can enable more detailed query logging by writing "enableQueryProfiling" in the Index Browser for instance. Then, in your C:\CES7\Index\Default\Profiling folder (or wherever you index is located), you should see detailed query logging.

Ask a question