|
2 | 2 | <!--- @@displayname: CloudSearch ---> |
3 | 3 |
|
4 | 4 | <cfimport taglib="/farcry/core/tags/formtools" prefix="ft" /> |
| 5 | +<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" /> |
| 6 | + |
| 7 | +<skin:loadJS id="fc-jquery" /> |
| 8 | +<skin:loadJS id="formatjson" /> |
| 9 | +<skin:htmlHead><cfoutput> |
| 10 | + <style> |
| 11 | + ##message-log td, ##message-log th { |
| 12 | + padding: 5px; |
| 13 | + } |
| 14 | + ##message-log .this-item td { |
| 15 | + background-color: ##dff0d8; |
| 16 | + } |
| 17 | + ##message-log .related-item td { |
| 18 | + background-color: ##fcf8e3; |
| 19 | + } |
| 20 | + .formatjson .key { |
| 21 | + color:##a020f0; |
| 22 | + } |
| 23 | + .formatjson .number { |
| 24 | + color:##ff0000; |
| 25 | + } |
| 26 | + .formatjson .string { |
| 27 | + color:##000000; |
| 28 | + } |
| 29 | + .formatjson .boolean { |
| 30 | + color:##ffa500; |
| 31 | + } |
| 32 | + .formatjson .null { |
| 33 | + color:##0000ff; |
| 34 | + } |
| 35 | + </style> |
| 36 | +</cfoutput></skin:htmlHead> |
| 37 | + |
| 38 | +<cfset stDoc = application.fapi.getContentType("csContentType").getCloudsearchDocument(stObject=stObj) /> |
| 39 | +<cfset jsonOut = application.fapi.formatJSON(serializeJSON(stDoc)) /> |
| 40 | +<ft:field label="Document"><cfoutput><pre class="formatjson">#jsonOut#</pre></cfoutput></ft:field> |
5 | 41 |
|
6 | 42 | <cfset stResult = application.fc.lib.cloudsearch.search(typename=stObj.typename,conditions=[{ "property"="objectid", "term"=stObj.objectid }]) /> |
7 | 43 | <cfoutput><h2>Object ID Search</h2></cfoutput> |
8 | 44 | <ft:field label="Query"><cfoutput><pre>#stResult.rawQuery#</pre></cfoutput></ft:field> |
9 | 45 | <ft:field label="Filter"><cfoutput><pre>#stResult.rawFilter#</pre></cfoutput></ft:field> |
10 | 46 | <ft:field label="Records found"><cfoutput>#stResult.items.recordcount#</cfoutput></ft:field> |
11 | 47 |
|
12 | | -<cfset stResult = application.fc.lib.cloudsearch.search(conditions=[{ "text"=stObj.label }]) /> |
| 48 | +<cfset stResult = application.fc.lib.cloudsearch.search(rawQuery=stObj.label) /> |
13 | 49 | <cfoutput><h2>Label Search</h2></cfoutput> |
14 | 50 | <ft:field label="Query"><cfoutput><pre>#stResult.rawQuery#</pre></cfoutput></ft:field> |
15 | 51 | <ft:field label="Filter"><cfoutput><pre>#stResult.rawFilter#</pre></cfoutput></ft:field> |
|
0 commit comments