We have a hit in search performance, especially if user belongs to different
region.
Here is the scenario
We got XML with element <GroupId> & <AccessType > both are INT.
<AccessType> will contains 0 or 1 (public/Private)
<GroupId> will contain number.
Now search logic is , if am a member of GroupId 1, get me all records of
GroupId 1 AND rest all GroupId with AccessType 0.
This means Public/Private of GroupId 1 + rest all public records.
Now if I have a user who belongs to 5-6 different GroupId,my query will become
((AccessType:1 AND (GroupId:620 OR GroupId:732 OR GroupId:966 OR GroupId:967 OR
GroupId:971 OR GroupId:972 ) ) OR
(AccessType:0))
This is working ok with NA region but for EU and other region its very slow. If
GroupId got increase for any user it's a timeout
We have grammar define in config as
<grammar>
<starter strength="30" apply="grouping" delimiter=")">(</starter>
<starter strength="40" apply="prefix" element="cts:not-query">NOT</starter>
<starter strength="40" apply="prefix"
element="cts:not-query">EXCEPT</starter>
<joiner strength="10" apply="infix" element="cts:or-query"
tokenize="word">OR</joiner>
<joiner strength="20" apply="infix" element="cts:and-query"
tokenize="word">AND</joiner>
<quotation>"</quotation> (: " :)
<joiner strength="50" apply="constraint">:</joiner>
</grammar>
groupId and accestype both are constraint
<constraint name="AccessType">
<range collation="http://marklogic.com/collation/" type="xs:int"
facet="false">
<facet-option>limit=10</facet-option>
<element ns="http://ms.com/firmwidePolicy" name="accessType"/>
</range>
<annotation>
<proj:front-page
xmlns:proj="http://marklogic.com/appservices/project">false</proj:front-page>
<proj:side-bar
xmlns:proj="http://marklogic.com/appservices/project">true</proj:side-bar>
</annotation>
</constraint>
<constraint name="GroupId">
<range type="xs:int" facet="true">
<facet-option>limit=10</facet-option>
<element ns="http://ms.com/firmwidePolicy" name="groupId"/>
</range>
<annotation>
<proj:front-page
xmlns:proj="http://marklogic.com/appservices/project">false</proj:front-page>
<proj:side-bar
xmlns:proj="http://marklogic.com/appservices/project">true</proj:side-bar>
</annotation>
</constraint>
~Gurbeer
________________________________
NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or
views contained herein are not intended to be, and do not constitute, advice
within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and
Consumer Protection Act. If you have received this communication in error,
please destroy all electronic and paper copies and notify the sender
immediately. Mistransmission is not intended to waive confidentiality or
privilege. Morgan Stanley reserves the right, to the extent permitted under
applicable law, to monitor electronic communications. This message is subject
to terms available at the following link:
http://www.morganstanley.com/disclaimers If you cannot access these links,
please notify us by reply message and we will send the contents to you. By
messaging with Morgan Stanley you consent to the foregoing.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general