Sensenet: Search by Content List fields on Query Builder - sensenet

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

Related

RTC OSLC query to filter only tasks from workitem

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

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>"

How to use Xpath extractor to extract mutiple fields using SOAP request in Jmeter?

I imported the webservice and did my first transaction passed. I see the request and reply xml
Now I want to extract ton of field values from the reply xml that I got and need to pass into Request xml.
For one field I know how to do that. I use Xpath Extractor to extract like this
//*[local-name()='Data']/text()`.
In the next action, I can just use as ${Data} which is working fine.
But I need to extract the text content from ton of fields that need to be passed into the next action.
How to do that using Xpath Extractor?
If your XPath query matches multiple /Data/text fields they will be caught as
TEXT_1=first match
TEXT_2=second match
etc.
If you need to combine results from different queries it can be done via pipe sign - | like
//*[local-name()='Data']/text()` | //*[local-name()='Something else']/text()
In this case result will go to the single variable.
Third option is using as many XPath extractors as needed.
See XPath Tutorial for general language reference and Using the XPath Extractor in JMeter guide for more tips and tricks.

match any part of a URL in lucene

Presently i am using PrefixQuery it's working fine but it get's a record like if my url is
http://xyz.com then it will get http://xyz.com and http://xyz.com/service/...
but it can't get http://www.xyz.com and http://xyz.co.in.i want to search based on any parts of url my code is :-
Term term = new Term("URL", siteUrl.toLowerCase());
Query query1 = new PrefixQuery(term);
booleanQuery.add(query1,BooleanClause.Occur.MUST);
You can use a WildcardQuery. But you need to know that it has bad performance, especially with queries with a leading wildcard (not because it has been poorly implemented but because of how Lucene internally stores its term dictionary).
Can't your use-case be solved by using a custom analyzer?