I need to use REST API to query IBM WCM 8.0 on the contents stored in it.
When i use the following query format, it works fine:
wcmrest/query?keyword=ABC&keyword=DEF
This returns all the contents which has both ABC and DEF as values in keywords.
My requirement is to search contents that matches either ABC or DEF keywords.
Kindly let me know what query I need use for the same?
Also, is it possible to search WCM based on user defined metadata?
The dynamic/adhoc queries do not have a query parameter that can perform an OR for multiple keywords.
This can be achieved using the a pre-defined query: http://infolib.lotus.com/resources/portal/8.0.0/doc/en_us/PT800ACD004/wcm/wcm_rest_defined.html
For example you could use the following user defined query:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definedQuery pageSize="10" page="1" restrictParameters="false" depth="DESCENDANTS">
<select>
<keywordIn>
<keyword>ABC</keyword>
<keyword>XYZ</keyword>
</keywordIn>
</select>
<allowParameters/>
</definedQuery>
Related
I set up a basic JHipster project and generated an entity that supports filtering with JDL.
The generator made a Swagger API which I use for querying the database.
The Swagger API doc shows me a list of parameters which can be used to build query.
The template query looks like this:
GET /api/client?name.equals=john&surname.equals=doe&country.in=uk&country.in=de
The request works fine but the parameters are chained like name==john OR surname==doe OR country==uk OR country==de so I get all johns, does, and everoyne from uk and de.
This is ok, but for some queries i need name==john AND surname==doe so not all Johns and Does but specifically John Doe. I searched here and on the swagger forum but couldn't find the answer.
My question is: how do I achieve changing the OR to AND in the query?
Does this swagger query support AND or do I have to make changes in the backend?
Your question is not about swagger, this is why you could not find anything in swagger forum.
It's about JHipster JPA entity filtering and the answer is no: you can't generate code that would use a OR.
You must code it yourself, look at the *QueryService classes and assemble your criteria with the logic you need.
Using the SumoLogic Search Templates with the tourl operator combined with the ability to Use_a_URL_to_Run_a_Search
I would like to launch a search that sets the search parameters via query string arguments. I've been unable to find documentation on this ability, and it doesn't seem supported.
It seems my only option would be to create something custom that uses the API directly to get the desired behavior.
Anyone else tried this or have advice?
It is not exactly what you are asking for but have you considered just using the share url feature? This properly populates parameters prefilled and is much easier to construct to boot.
https://help.sumologic.com/Search/Get-Started-with-Search/Search-Basics/Share-a-Link-to-a-Search
HTTP GET, retrive values from an xml
and than I need to call a PUT many times as the number of element with some values I got from the first GET.
I have an xml for example
<root>
<element>
<valId>1111</valId>
<valName>Name</valName>
</element>
<element>
<valId>1111</valId>
<valName>Name</valName>
</element>
....
</root>
So I have:
HTTP GET: retrive an xml
xpath extractor 1 for valsId
xpath extractor 2 for valsName
Now I have two array with multiple values in valId and valName, I can access to them with valsId_1, valsId_2, etc
Then I have a foreach controller in input I have valsId and output the current value myId.
as child of foreach controller I have my http PUT where I use myId but I don't know how to get the current value of valsName.
In my opinion for this kind of problem there two way:
1 extract the values in array, as I did
2 extract a part of xml and than process it everytime in a for
I hope you understand what I meant with my problem.
Any suggestions are welcome
For handling second variable "valsName" just place below code
${__BeanShell(vars.get("valsName_"+${__counter(TRUE,page)}))}
at the position of Name
<valName>Name</valName>
it'll resolve your problem.
Mendeley has a Catalog Search -> Search by query API that looks like the following: curl 'https://api.mendeley.com/search/catalog?query=polar+bears&limit=3' ...
The API Reference documentation says: "Retrieve documents which match general query terms."
I am wondering what general query terms (besides 'query=xxx' and 'limit=y') are available. I tried including some of the returned fields as parameters, e.g. year=2002, which was seemingly ignored, and title=xxx, which provoked the error: "Invalid parameters supplied"
It's all documented on the Swagger page.
You can use title, and you can also search by year using min_year and max_year.
In Ruby on Rails, using NeoGraphy, I'm constructing a parameterized cypher query and getting back a result.
#results = $neo.execute_query(query, parameters)
Using gon, I put all these to the client and checked them out in the javascript console:
gon.results = #results
gon.search_query = query
gon.search_parameters = parameters
gon.search_query is just what I see in the .rb file, so I guess that means cypher takes that and takes the parameters and then creates the query. Can I get to the string version of the query that must be created by using the parameter values?
The reason I want this is so that I can paste it into the neo4j web admin console tool and tweak it.
Thanks!
Perhaps the simplest way to accomplish that is to write your own print method that given the query and the parameters would print the expanded query. And you can call it before / after the $neo.execute_query