I am not sure I understand your question, but I'll take a stab.

I would guess that using search:parse would be more efficient, but more 
importantly, it will get you the query you want.  Otherwise you will have to 
reimplement it to parse the constraints.  Is it taking a long time?  Have you 
tried profiling it to see where it is spending time?

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Abhishek53 S
Sent: Monday, June 27, 2011 11:05 AM
To: General MarkLogic Developer Discussion
Cc: [email protected]
Subject: [MarkLogic Dev General] Query Parsing

Hi Folks

(1) Currently my search application input is query text. eg "constr1:value1 OR 
constr2:value2".This requires to be parsed separately using search:parse API. 
The output query xml is converted to cts:query and then passed to the 
additional query (required to be excluded for highlighting). The query text can 
be very large and complex.

(2) In spite of sending the query text if the application send the constraint 
values then the cts:query can be created and directly send to the additional 
query. This can save the additional step of parsing the query.
 e.g. additional-query = cts:or-query(($some-xml//values))

My area of concern is which would be more efficient term of performance

1. Creating cts query (2) from the values sent from application
2. Parsing the query using search:parse (1) and then casting to cts:query

Thanks in advance !
Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]<mailto:[email protected]>
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to