RTC OSLC query to filter only tasks from workitem - rtc

How to filter workitems by tasks in OSLC api, I've tried the following queries but none of them is working
https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=dcterms:type=task
https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=dc:type=task
https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=type=task

You need to URL quote the query content, for example your attempted/hypothetical query URL:
https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=dcterms:type=task
Has to be encoded for actual use as:
https://rtcserver/ccm/oslc/contexts/somekey/workitems.json?oslc_cm.query=dcterms%3Atype%3Dtask
For more details/background see the OSLC query specification https://open-services.net/bin/view/Main/OSLCCoreSpecQuery - look for the section at the bottom "URL Encoding"
The example there, just for the parameter part of the URL is::
Not encoded:
?oslc.where=dcterms:title="test case 1" and dcterms:modified>="2008-12-02T18:42:30"
Encoded:
?oslc.where=dcterms%3Atitle%3D%22test%20case%201%22%20and%20dc%3Amodified%3E%3D%222008-12-02T18%3A42%3A30%22

Related

How to include the query filter in URL (cloudSearch)

I am trying to retrieve data from cloudSearch, searching for the word "Person" and adding the following filter:
(prefix field=claimedgalleryid '')
The problem is that I don't know how to create the URL using that exact filter.
Could someone give me a suggestion or some link to Amazon documentation related to this topic?
What I've tried and didn't work:
...search?q=Gallerist&size=10&start=0&fq=(prefix%20field=claimedgalleryid%20%27%27)
...search?q=Gallerist&size=10&start=0&filter=(prefix%20field=claimedgalleryid%20%27%27)
You were close with your first attempt--it looks like you forgot to URI encode the = sign as %3D. Try this instead:
&fq=(prefix+field%3Dclaimedgalleryid+'')
I highly recommend using the "test search" feature to work out the kinks in your query syntax. You can see the results right there, and then use the "View Raw: JSON" link to copy the full request URL and see how characters get escaped and such.

Sensenet: Search by Content List fields on Query Builder

I'm trying to make an query on Query builder. This query should search by content using the Content List fields.
In the documentation is indicated that I can use CQL but it seems that in this case is not working.
The query that I'm trying to make is:
TypeIs:File AND #Location:Lisbon
The # char should be url encoded (because the query will be executed by an ajax request through OData). So use it this way:
TypeIs:File AND %23Location:Lisbon

scraping results not limited according to the passed parameters - kimonolabs

i've tried to add the parameters "kimoffset" and "kimlimit" to the source url of my api, but this doesn't limit and/or shift the scraped results
my api's source url:
http://www.tripadvisor.com/Hotels-g187791-Rome_Lazio-Hotels.html?kimlimit=10&kimoffset=100
are these parameter used for this?
why doesn't work?
the results in data preview area are always the same
For some reason the server is ignoring your query string kimlimit=10&kimoffset=100.

Date range search using Google Custom Search API

I am using the Google Custom Search API to search for images. My implementation is using Java, and this is how I build my search string:
URL url = new URL("https://ajax.googleapis.com/ajax/services/search/images?"
+ "v=1.0&q=barack%20obama&userip=INSERT-USER-IP");
How would I modify the URL to limit search results, for example, to: 2014-08-15 and 2014-09-31?
You can specify a date range using the sort parameter. For your example, you would add this to your query string: sort=date:r:20140815:20140931.
This is documented at https://developers.google.com/custom-search/docs/structured_data#page_dates
Also if you use Google's Java API you can use the Query class and its setSort() method rather than building the URL by hand.
I think the better way is to put this into query itself. Query parameter contains 'after' flag which can be used like:
https://customsearch.googleapis.com/customsearch/v1?
key=<api_key>&
cx=<search_engine_id>&
q="<your_search_word> after:<YYYY-MM-DD>"

Searching for multiple parameters in URL using JQL

I am new to Jira and am trying to understand JQL. I have been trying to figure out a way by which I can search for multiple parameters in a URL using the '%' wild card char using JQL.
So here's the sample JQL I am running in the advanced search section :-
"Business Unit/Domain" = "My Back Window" AND "PoC URL" ~ "%q=mm&start=%"
Now there are several URLs of the form
http://www.myhouse.com/index/refine?q=mm&start=0;xyz
Now when I do the above JQL i get the above URL as the result. But if I change the JQL to something like :-
"Business Unit/Domain" = "My Back Window" AND "PoC URL" ~ "%q=mm%"
I do not get any results at all. Logically using the 'like(~)' operator and the wild card char, '%', in the above fashion should also give me the result that I received from the former JQL, right ?
I come from the SQL background and am trying to assume that JQL is quite similar to SQL, unless of course I am missing something.
So what am I missing here ? Why don't I get the expected result and if this is the way JQL works then please advice a suitable work around for doing what is intended as indicated in the latter JQL. (That is searching for multiple parameters in a URL using ~ and % in JQL).
Why are you using '%' character? This is a reserved character in JQL and you also do not need it - you can just type "q=mm&start="
"Business Unit/Domain" = "My Back Window" AND "PoC URL" ~ "q=mm"
There is also a bug which prevents searching for terms which contain special characters even if properly escaped
https://jira.atlassian.com/browse/JRA-25092
See this page for more information:
https://confluence.atlassian.com/display/JIRA/Performing+Text+Searches