+ Reply to Thread
Results 1 to 6 of 6
Thread: Multi query operations
-
05-08-2012 10:32 PM #1Junior Member
- Join Date
- May 2011
- Posts
- 20
Multi query operations
Hi,
It seems that I can’t call a multi query operation (OR operation) with Trends API. I tried:
but none of the settings above achieve an OR operation for ‘laptop bags’ OR ‘laptop case’.Code:query: laptop bags | laptop case query: @keyword laptop bags | laptop case query: array(‘laptop bags’, ‘laptop case’) extendedQuery: laptop bags | laptop case extendedQuery: @keyword laptop bags | laptop case filterKeyword: laptop bags | laptop case filterKeyword: array(‘laptop bags’, ‘laptop case’)
returned a result. Though it seems it was a right method to do an OR operation, but it wasn’t. The result was not an OR operation for ‘laptop bags’ result OR ‘laptop case’ result. If I add an empty result query in it, eg:Code:query: laptop bags | laptop case
it will return an empty result.Code:query: laptop bags | laptop case | asdfjkasdf
What is the method / parameter to set a multi query operation (OR operation) within Trends API (API Ver. 2.0.8)?
Thanks
-
05-08-2012 10:58 PM #2
Try:
The * provides a loose match, instead of an exact match. To hit on an exact match, you would need to know the entire keyword you are looking for, ie. 'filterKeyword' => 'HEX 11 Recon Laptop Case'Code:$prosperentApi = new Prosperent_Api(array( 'commissionDateRange' => '20120301,20120501', 'filterKeyword' => array('*laptop bag*', '*laptop case*') )); $prosperentApi->fetchTrends();
See thread on wildcard filtering: http://community.prosperent.com/show...highlight=nike
-
05-09-2012 05:31 AM #3Junior Member
- Join Date
- May 2011
- Posts
- 20
Thanks Andrew,
It works perfectly, accept for one thing: I’m not able to insert a wildcard between words.
query: laptop bags -> returned 7 results.
filterKeyword: array(‘*laptop bags*’) -> returned empty result.
filterKeyword: array(‘*laptop*bags*’) -> returned empty result.
Is there a way to insert wildcard between words? Or other way to achieve multi query operation?
-
05-09-2012 07:04 AM #4
For that, you would basically have to use an or between the words you want separated.
-
05-09-2012 07:38 AM #5
-
05-09-2012 07:40 PM #6Junior Member
- Join Date
- May 2011
- Posts
- 20
Thanks Brian,
Because this is not the catalog, I think it would be better to get all the data without filter and process it locally, rather than cache individual query results which can contain thousands of queries. Thanks for your input.

Reply With Quote
