[转]Finding a query in UCM using the query builder
2011-05-27 09:47
447 查看
published by Yannick on 9 February, 2011 - 11:24
I often need to look at the documentation to find the correct syntax for the query language provided in UCM. This is used when you want to integrate UCM with for example ADF or WebCenter and use the RIDC API. If you want to find documents, you use the GET_SEARCH_RESULT service. This service requires a queryString as parameter.
UCM has its own query language and I often need to find the correct syntax.
Luckely for us, there is a tool that we can use to build the query and just copy/paste this into our application.
First make sure you are logged in to UCM.
Open the search page and press the show advanced options on the right:
This will show a textarea that show you the complete query. For example I want to find all the pdf's containing "Oracle" in the title:
You now can use this query in the RIDC API:
binder.putLocal("IdcService", "GET_SEARCH_RESULTS");
binder.putLocal("QueryText", "dDocTitle `Oracle` dExtension `pdf`");
binder.putLocal("ResultCount", "1");
ServiceResponse response = idcClient.sendRequest(userContext, binder);
DataBinder serverBinder = response.getResponseAsBinder();
binder = response.getResponseAsBinder();
DataResultSet resultSet = binder.getResultSet("SearchResults");
for (DataObject dataObject : resultSet.getRows()) {
System.out.println(dataObject.get("dDocTitle"));
}
As you see, the syntax is different from what you are used to in regular databases.
It is also very important to know that the fields in the queryText are case sensitive so dDocName will work but ddocname will not work.
The special `sign is also important to put around a string. If you try to add " or ', it also won't work. You need to use ` instead.
I often need to look at the documentation to find the correct syntax for the query language provided in UCM. This is used when you want to integrate UCM with for example ADF or WebCenter and use the RIDC API. If you want to find documents, you use the GET_SEARCH_RESULT service. This service requires a queryString as parameter.
UCM has its own query language and I often need to find the correct syntax.
Luckely for us, there is a tool that we can use to build the query and just copy/paste this into our application.
First make sure you are logged in to UCM.
Open the search page and press the show advanced options on the right:
This will show a textarea that show you the complete query. For example I want to find all the pdf's containing "Oracle" in the title:
You now can use this query in the RIDC API:
binder.putLocal("IdcService", "GET_SEARCH_RESULTS");
binder.putLocal("QueryText", "dDocTitle `Oracle` dExtension `pdf`");
binder.putLocal("ResultCount", "1");
ServiceResponse response = idcClient.sendRequest(userContext, binder);
DataBinder serverBinder = response.getResponseAsBinder();
binder = response.getResponseAsBinder();
DataResultSet resultSet = binder.getResultSet("SearchResults");
for (DataObject dataObject : resultSet.getRows()) {
System.out.println(dataObject.get("dDocTitle"));
}
As you see, the syntax is different from what you are used to in regular databases.
It is also very important to know that the fields in the queryText are case sensitive so dDocName will work but ddocname will not work.
The special `sign is also important to put around a string. If you try to add " or ', it also won't work. You need to use ` instead.
相关文章推荐
- Using the Index Server to create Query Page in asp.net
- Finding crash information using the MAP file
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
- A full-duplex audio player in C# using the waveIn/waveOut APIs
- Item22 When using the Pimpl, define specific member functions in the implementation file
- Reining in the Outliers in Map-Reduce Clusters using Mantri
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
- mysqldump: [Warning] Using a password on the command line interface can be insecure.
- [ReactVR] Render Custom 3D Objects Using the Model Component in React VR
- [ReactVR] Animate Text, Images, Views, and 3D Elements Using the Animated Library in React VR
- mysql 5.7 Warning: Using a password on the command line interface can be insecure. 解决方案
- PHP: Send the Authorization token in a header instead of on the querystring and 读取 XML
- query specified join fetching, but the owner of the fetched association was not present in the selec
- Using a date for a datetime field in a SOQL Query [duplicate]
- the case of using Json in my working
- 32-bit Assembler is Easy, why and how to develop using the assembler; start learning to program in Assembly now!
- Why are some of the tables in my query missing from the plan?
- mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
- Previewing an image before uploading it using the FileReference class in Flash Player 10
- query specified join fetching, but the owner of the fetched association was not present in the select list