Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
LAPI Search and TotalRawCount
Michael_Safro_(michaelsafro_-_(deleted))
Hello, How can I get the TotalRawCount property using LAPI Search? Is it possible at all? What are the alternatives? Regards, Michael
Find more posts tagged with
Comments
Louis_Routhier
Directly from existing code, this information isn't available so up to my knowledge, you have 3 options 2 being quite similar.1- Set your ForHowMany parameter to the biggest value possible. The impact of this solution is that you're adding an incredibly big potential overhead.2- Make a new module in which you orphan the APISearch.ApplyQuery function and add the information into the output. You could then modify the other information required for an API an generate your new stub. You may want to look to the following URL for a step-by-step guide on how to achieve this:
http://communities.opentext.com/communities/llisapi.dll/wiki/162164/How to create a new LAPI API3-
Build a patch doing the exact same thingThe impact of solution 2 and 3 is that you have to stay alert as to new updates made to the applyquery code by either OT patches or new Livelink versions.Attached, you'll find a patch doing what I'm telling you.If you use the patch alternative, you will also have to modify the stub side by either building a new API set or overriding the existing search API. In C#, the new stub would look someting like:public override int ApplyQuery(int NodeID, LLValue SelectList, string Where, int SortBy, string RankBy, int StartAt, int ForHowMany, string QueryConversion, LLValue AssocQueryResults){ this.fConnect.initCall("ApplyQuery"); this.fConnect.marshall(); this.fConnect.marshall("NodeID", NodeID); this.fConnect.marshall("SelectList", SelectList); this.fConnect.marshall("Where", Where); this.fConnect.marshall("SortBy", SortBy); this.fConnect.marshall("RankBy", RankBy); this.fConnect.marshall("StartAt", StartAt); this.fConnect.marshall("ForHowMany", ForHowMany); this.fConnect.marshall("QueryConversion", QueryConversion); this.fConnect.execute(this.fConnect); AssocQueryResults.add("listQueryResults",this.fConnect.unMarshall("listQueryResults")); AssocQueryResults.add("totalResultsCount",this.fConnect.unMarshall("totalResultsCount")); this.fConnect.unMarshall(); return this.fConnect.getStatus();}While this should work, I must say that it wasn'T tested but that the concept is there.