With the new ability for anyone to see certain insights from pages without admin permissions, I was curious if this extends to the graph api, specifically in regards to the graph of fan growth. If you hover your mouse over a data point, it'll tell you the new fans / 7 days of that particular point in time -- is there any way to query this automatically with either fql or the regular graph api?
I've tried SELECT metric, value FROM insights WHERE object_id = 224383614973 AND metric = 'page_fan_adds' AND end_time=1342915199 AND period=86400 to query the McDonald's Canada new fans for a one-day period, but it requires a valid access_token.
Sorry for the late reply but it might help someone. You can use the graph explorer to build your FQL query:
https://developers.facebook.com/tools/explorer/?method=GET&path=CocaColaCanada%2Finsights
Also all the metrics for the page start with page_ and are available here:
https://developers.facebook.com/docs/reference/api/insights/#page_stories
Some of them are not public.
In all cases you need valid access_token
UPDATE:
I've run a script for macdonald using the 233 metrics that facebook offers to see which one are public metrics for a page. Here is the result:
McDonalds(233 metrics)
application_active_users: no
application_active_users_locale: no
application_active_users_city: no
application_active_users_country: no
application_active_users_gender: no
application_active_users_age: no
application_active_users_gender_age: no
application_installed_users: no
application_installed_users_locale: no
application_installed_users_city: no
application_installed_users_country: no
application_installed_users_gender: no
application_installed_users_age: no
application_installed_users_gender_age: no
application_installation_adds: no
application_installation_adds_unique: no
application_installation_removes: no
application_installation_removes_unique: no
application_tos_views: no
application_tos_views_unique: no
application_permission_views_top: no
application_permission_views_top_unique: no
application_permission_grants_top: no
application_permission_grants_top_unique: no
application_block_adds: no
application_block_adds_unique: no
application_block_removes: no
application_block_removes_unique: no
application_mobile_app_installs: no
application_like_adds: no
application_like_adds_unique: no
application_like_removes: no
application_like_removes_unique: no
application_comment_adds: no
application_comment_adds_unique: no
application_photos: no
application_photos_unique: no
application_shares: no
application_shares_unique: no
application_status_updates: no
application_status_updates_unique: no
application_stream_stories: no
application_stream_stories_unique: no
application_feed_form_views: no
application_feed_form_views_unique: no
application_feed_form_views_login: no
application_feed_form_views_login_unique: no
application_feed_form_views_logout: no
application_widget_activity_views: no
application_widget_activity_views_unique: no
application_widget_activity_views_login: no
application_widget_activity_views_login_unique: no
application_widget_activity_views_logout: no
application_widget_activity_views_external_referrals: no
application_widget_comments_views: no
application_widget_comments_views_unique: no
application_widget_comments_views_login: no
application_widget_comments_views_login_unique: no
application_widget_comments_views_logout: no
application_widget_fan_views: no
application_widget_fan_views_unique: no
application_widget_fan_views_login: no
application_widget_fan_views_login_unique: no
application_widget_fan_views_logout: no
application_widget_fan_views_external_referrals: no
application_widget_like_views: no
application_widget_like_views_unique: no
application_widget_like_views_login: no
application_widget_like_views_login_unique: no
application_widget_like_views_logout: no
application_widget_like_views_external_referrals: no
application_widget_live_stream_views: no
application_widget_live_stream_views_unique: no
application_widget_live_stream_views_login: no
application_widget_live_stream_views_login_unique: no
application_widget_live_stream_views_logout: no
application_widget_live_stream_views_external_referrals: no
application_widget_recommendation_views: no
application_widget_recommendation_views_unique: no
application_widget_recommendation_views_login: no
application_widget_recommendation_views_login_unique: no
application_widget_recommendation_views_logout: no
application_widget_recommendation_views_external_referrals: no
application_widget_share_views: no
application_widget_share_views_unique: no
application_widget_views: no
application_widget_views_unique: no
application_widget_views_login: no
application_widget_views_login_unique: no
application_widget_views_logout: no
application_opengraph_action_create: no
application_opengraph_action_delete: no
application_opengraph_object_create: no
application_opengraph_object_update: no
application_opengraph_story_impressions: no
application_opengraph_story_click: no
application_opengraph_story_like: no
application_opengraph_story_unlike: no
application_opengraph_story_comment: no
application_opengraph_story_hide: no
application_opengraph_story_hide_all: no
application_opengraph_story_report_spam: no
application_opengraph_link_impression: no
application_opengraph_link_click: no
application_opengraph_timeline_impressions: no
application_opengraph_timeline_spam: no
application_opengraph_timeline_clicked: no
application_canvas_views: no
application_canvas_views_unique: no
application_canvas_views_login: no
application_canvas_views_login_unique: no
application_canvas_views_logout: no
application_canvas_views_internal_referrals: no
application_canvas_views_external_referrals: no
application_tab_views: no
application_tab_views_unique: no
application_api_calls: no
application_api_calls_top: no
application_api_calls_unique: no
application_api_errors: no
application_api_errors_rate: no
application_api_errors_top: no
application_api_time_average: no
application_canvas_errors: no
application_canvas_errors_rate: no
application_canvas_time_average: no
page_fans_locale: no
page_fans_city: no
page_fans_country: ok
page_fans_gender_age: no
page_fan_adds: no
page_fan_adds_unique: no
page_fans_by_like_source: no
page_fans_by_like_source_unique: no
page_fan_removes: no
page_fan_removes_unique: no
page_friends_of_fans: no
page_tab_views_login_top_unique: no
page_tab_views_login_top: no
page_views: no
page_views_unique: no
page_views_login: no
page_views_login_unique: no
page_views_logout: no
page_views_external_referrals: no
page_posts_impressions: no
page_posts_impressions_unique: no
page_posts_impressions_paid: no
page_posts_impressions_paid_unique: no
page_posts_impressions_organic: no
page_posts_impressions_organic_unique: no
page_posts_impressions_viral: no
page_posts_impressions_viral_unique: no
page_posts_impressions_frequency_distribution: no
post_stories: no
post_storytellers: no
post_stories_by_action_type: no
post_storytellers_by_action_type: no
post_impressions: no
post_impressions_unique: no
post_impressions_paid: no
post_impressions_paid_unique: no
post_impressions_fan: no
post_impressions_fan_unique: no
post_impressions_fan_paid: no
post_impressions_fan_paid_unique: no
post_impressions_organic: no
post_impressions_organic_unique: no
post_impressions_viral: no
post_impressions_viral_unique: no
post_impressions_by_story_type: no
post_impressions_by_story_type_unique: no
post_consumptions: no
post_consumptions_unique: no
post_consumptions_by_type: no
post_consumptions_by_type_unique: no
post_engaged_users: no
post_negative_feedback: no
post_negative_feedback_unique: no
post_negative_feedback_by_type: no
post_negative_feedback_by_type_unique: no
domain_feed_clicks: no
domain_feed_views: no
domain_stories: no
domain_widget_comments_adds: no
domain_widget_comments_views: no
domain_widget_comments_feed_views: no
domain_widget_comments_feed_clicks: no
domain_widget_like_views: no
domain_widget_likes: no
domain_widget_like_feed_views: no
domain_widget_like_feed_clicks: no
domain_widget_send_views: no
domain_widget_send_clicks: no
domain_widget_send_inbox_views: no
domain_widget_send_inbox_clicks: no
page_stories: no
page_storytellers: no
page_stories_by_story_type: no
page_storytellers_by_story_type: no
page_storytellers_by_age_gender: no
page_storytellers_by_country: ok
page_storytellers_by_locale: no
page_impressions: no
page_impressions_unique: no
page_impressions_paid: no
page_impressions_paid_unique: no
page_impressions_organic: no
page_impressions_organic_unique: no
page_impressions_viral: no
page_impressions_viral_unique: no
page_impressions_by_story_type: no
page_impressions_by_story_type_unique: no
page_impressions_by_city_unique: no
page_impressions_by_age_gender_unique: no
page_impressions_frequency_distribution: no
page_impressions_viral_frequency_distribution: no
page_engaged_users: no
page_consumptions: no
page_consumptions_unique: no
page_consumptions_by_consumption_type: no
page_consumptions_by_consumption_type_unique: no
page_places_checkin_total: no
page_places_checkin_total_unique: no
page_places_checkin_mobile: no
page_places_checkin_mobile_unique: no
page_places_checkins_by_age_gender: no
page_places_checkins_by_locale: no
page_places_checkins_by_country: no
page_negative_feedback: no
page_negative_feedback_unique: no
page_negative_feedback_by_type: no
page_negative_feedback_by_type_unique: no
Started at: 2013-04-17 02:14:29
Ended at: 2013-04-17 02:17:13
Second elapsed: 164s
enter code here
Related
I am using HERE-Android-SDK to build a simple navigation solution with offline maps.
While using the offline mode for the search addresses and calculation of a route, I can see that there are results returned from the address-search, which are not included in the installed offline map datasets. Is there anything additional which I need to do, in order to get only search results which are located inside the offline-map data installed on my device?
I am using the following code snippets.
download offline maps for a specific country:
mapsLoader.selectDataGroup(MapPackage.SelectableDataGroup.TruckAttributes)
mapsLoader.installMapPackages(listOf(mapPackageId))
search request for addresses:
val term = "New York"
val center = GeoCoordinate(lastWayPoint.latitude, lastWayPoint.longitude)
val request = SearchRequest(term)
request.connectivity = Request.Connectivity.OFFLINE
request.locale = Locale.GERMAN
request.setSearchCenter(center)
request.collectionSize = 5
request.execute { data, error ->
if (error != ErrorCode.NONE) return
// handle search results here
}
Thanks for all of your help in advance!
I am trying to create a custom alert from a log-based metric in GCP for a K8s node pool no.scale.up event.
I am using the current query:
resource.labels.project_id="my_project"
resource.labels.location="my_zone"
resource.labels.cluster_name="my_cluster"
logName="projects/my_project/logs/container.googleapis.com%2Fcluster-autoscaler-visibility"
jsonPayload.noDecisionStatus.noScaleUp.reason.messageId="no.scale.up.in.backoff" OR
jsonPayload.noDecisionStatus.noScaleUp.napFailureReason.messageId="no.scale.up.nap.disabled" OR
jsonPayload.noDecisionStatus.noScaleUp.napFailureReason.messageId="no.scale.up.nap.no.locations.available" OR
jsonPayload.noDecisionStatus.noScaleUp.skippedMigs[].reason.messageId="no.scale.up.mig.skipped" OR
jsonPayload.noDecisionStatus.noScaleUp.unhandledPodGroups[].rejectedMigs[].reason.messageId="no.scale.up.mig.failing.predicate" OR
jsonPayload.noDecisionStatus.noScaleUp.unhandledPodGroups[].napFailureReasons[].reason.messageId="no.scale.up.nap.pod.gpu.no.limit.defined" OR
jsonPayload.noDecisionStatus.noScaleUp.unhandledPodGroups[].napFailureReasons[].reason.messageId="no.scale.up.nap.pod.gpu.type.not.supported" OR
jsonPayload.noDecisionStatus.noScaleUp.unhandledPodGroups[].napFailureReasons[].reason.messageId="no.scale.up.nap.pod.gpu.other.error" OR
jsonPayload.noDecisionStatus.noScaleUp.unhandledPodGroups[].napFailureReasons[].reason.messageId="no.scale.up.nap.pod.zonal.resources.exceeded" OR
jsonPayload.noDecisionStatus.noScaleUp.unhandledPodGroups[].napFailureReasons[].reason.messageId="no.scale.up.nap.pod.zonal.failing.predicates"
Its a pretty exhaustive query that does not look right to me.
This query works and it does extract data from the logs.
Reading the documentation here: https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-autoscaler-visibility#eventresult-event
it talks about eventResult's but I cannot figure out how to get to these?
They do not appear to be in the cluster-autoscaler-visibility log.
Are the eventResults in this log: logName="projects/my_project/logs/events"?
(If so I could not find them with any query)
I have tried a query:
resource.type="k8s_cluster"
resource.labels.project_id="my_project"
resource.labels.location="my_zone"
resource.labels.cluster_name="my_cluster"
logName="projects/my_project/logs/events"
jsonPayload.resultInfo.results[].errorMsg = "scale.down.error.failed.to.mark.to.be.deleted" OR
jsonPayload.resultInfo.results[].errorMsg = "scale.down.error.failed.to.evict.pods" OR
jsonPayload.resultInfo.results[].errorMsg = "scale.down.error.failed.to.delete.node.min.size.reached" OR
jsonPayload.resultInfo.results[].errorMsg = "scale.up.error.out.of.resources" OR
jsonPayload.resultInfo.results[].errorMsg = "scale.up.error.quota.exceeded" OR
jsonPayload.resultInfo.results[].errorMsg = "scale.up.error.waiting.for.instances.timeout"
This does not produce anything useful even though I have no.scale.down and no.scale.up events searchable in the log explorer.
We are using cloud Dynamics 365 Business Central and trying to get items with all attributes via OData.
In Microsoft documentation we found this endpoint:
api.businesscentral.dynamics.com/v1.0[our tenant id]/Sandbox/ODataV4/Company('CRONUS%20DE')/items
But unfortunately, the response does not contain item attributes and values, such as Farbe, Tiefe, etc.
Next, we tried to add new Web Services. But some of this endpoints return empty values and some of them (7506, 7507, 7508, 7510) don't work and return:
No HTTP resource was found that matches the request URI
Objects 7500, 7501, 7503 contain information about attributes. But non of them (7500 - 7510) does not contain a relation between Item, Attributes, and Values.
Maybe there is another way to get items with their attribute values? We also tried to research microsoft graph but not successful.
i am having similar troubles with this. i find the dynamics api to be exceptionally unintuitive and difficult to use. the furthest i have been able to get has been to go into the api settings for dynamics and uncover the tables for a few item attributes (i believe that the table numbers are as those below:
7500 - Item Attribute
7501 - Item Attribute Value
7502 - Item Attribute Translation
7504 - Item Attribute Value Selection
7505 - Item Attribute Value Mapping
i cannot comment on why 7503 is missing.
using 7500 as an example, when you uncover the table, the system provides a resulting endpoint (unfortunately, they always promote OData, and the outdated SOAP resource; i can't figure out why they have such a vendetta against the simple and easy-to-use REST endpoint).
https://api.businesscentral.dynamics.com/v2.0/<TENANT_ID>/<ENVIRONMENT_NAME>/ODataV4/Company('COMPANY_IDENTIFIER')/ItemAttributes
using this endpoint, you can get a listing of the attribute types themselves (e.g. let's say you've defined an attribute called 'BaseColor', you should get a result here for the name of the attribute 'BaseColor', its ID, its type, etc.),
with the ItemAttributeValues endpoint, you should get the actual attribute values that are in existence (e.g. for some item, you happened to set its 'BaseColor' attribute to 'Blue', you should get a response for this attribute value with a attribute type of 'BaseColor', a value, as 'Blue' along with the entity's ID, etc).
yet, when it comes to any instantiated attribute values for items, i can't figure out how to get the association of the attributes with those items. i expect that the "item attribute value mapping" option would be something along the lines of a item_id - attribute_id pair so that for any item in question, one could query the attributes list with something like a filter. but as you said, upon uncovering some of these elements, their respective endpoints return nothing. you get to the point where you say 'OH...AWSOME! there is a value-item mapping. that makes sense, and i can definitely use that'. a few moments later, the API spits in your face with an error, or craps on you by returning something you don't expect like an empty data set.
this api is a constant uphill battle, and totally riddled with landmines. a complete blow-me-up-pain-in-the-arse.
EDIT: 2021-06-09
i've looked into this some more. i was able to set up an export package for the various tables in question, specifically 7500, 7501, and 7505. the magical table was 7505 as it is the relationship between an attribute value and the item with which it is associated. exporting the package to excel results in good data. yet, when trying to expose this information in the OData resource, something strange happens:
in web services, i try to open up page 7505 which populates the object name as ItemAttributeValueMapping and i set the service name to 'ItemAttributeValueMapping'. This is normal.
the system complains when i fail to specify that the object type is a page. so, i go back in the line and set the selection to "Page"
when i tab through to publish the change, the object name automatically changes to 'ItemAttributeValueTranslations'.
EDIT: 2021-06-15
After a lot of fiddling about, i finally reached a point where i decided that the only way to address this was to write an al query which would expose the appropriate value-item mapping information. there is a page which provides some source code for doing this:
github AL-Code-Samples
to get something out of the API, i had to use microsoft visual studio code. there are a few good videos on how to get this up and running to get a test app working for your business central instance (i used eric hougaar's videos: Getting started with Business Central AL Development).
when you have set up your app to connect to your instance by inserting your tenant and entering your credentials, you can modify the source code as below to create a query in your system.
query 50102 "<YOUR_QUERY_NAME>"
{
QueryType = API;
APIPublisher = '<YOUR_NAME>';
APIGroup = '<YOUR_APP_GROUP>';
APIVersion = 'v1.0';
Caption = '<YOUR CAPTION>';
EntityName = '<YOUR_QUERY_NAME>';
EntitySetName = '<YOUR_API_ENDPOINT_NAME>';
elements
{
dataitem(Item; Item)
{
column(No_; "No.")
{
}
column(Description; Description)
{
}
column(Unit_Cost; "Unit Cost")
{
}
dataitem(Item_Attribute_Value_Mapping; "Item Attribute Value Mapping")
{
DataItemLink = "No." = Item."No.";
column(Item_Attribute_ID; "Item Attribute ID")
{
}
column(Item_Attribute_Value_ID; "Item Attribute Value ID")
{
}
dataitem(QueryElement6; "Item Attribute")
{
DataItemLink = ID = Item_Attribute_Value_Mapping."Item Attribute ID";
column(Name; Name)
{
}
dataItem(Queryelement10; "Item Attribute Value")
{
DataItemLink = "Attribute ID" = Item_Attribute_Value_Mapping."Item Attribute ID",
ID = Item_Attribute_Value_Mapping."Item Attribute Value ID";
column(Value; Value)
{
}
column(Numeric_Value; "Numeric Value")
{
}
}
}
}
}
}
}
once this code gets successfully uploaded to your server and returning a page (you have to wait for it), you can then use specified query number to expose the data in the API by going to business central's "web services" and adding a 'Query' to item 50102 (or whatever number you use). the endpoint will automatically be populated and you can use it to send you back the necessary JSON which will show a product, with its attribute values.
hope that helps.
You should try with below endpoint:
/v2.0/tenant_id/enviornment_name/ODataV4/Company(company_id)/Items
The problem:
I had a similar problem to this thread - my Regex works like a charm in regex101, but returns null in google scripts.
I'm trying to return the next line on a number of items:
Confirmation code
Check-in
Checout
Payout
Number of Guest
Payout
Here is the data I am searching in:
New booking confirmed!Jake arrives Oct 22
Send a message to confirm check-in details or welcome Jake.
Jake Flake
Phoenix, California, United States
Airbnb member since 2015
Send Jake a message:
https://www.airbnb.com/z/q/;laskdf;lksjdf
The Getaway
https://www.airbnb.com/manage-listing/asdflkjsdf;lkajsfd
Trip details
Check-in
Sun, Oct 22
Anytime after 4PM
Checkout
Thu, Oct 26
11AM
Guests
13
Confirmation code
H7XS0SA8
View itinerary
https://www.airbnb.com/reservation/itinerary?code=aasdfasdf
Payment
$275.50 x 4 nights
$1102.00
Cleaning Fees
$180.00
Guest Pays
$1282.00
Airbnb Fees
-$38.46
You earn
$1243.54
On the day after your guest checks in, the payment method you supplied will be credited. For details, see your transaction history.
Your guest paid $161.15 in Occupancy Taxes. Airbnb remits these taxes on your behalf.
Get ready for Jake’s arrival
Provide Directions
Confirm that your guest knows how to get to your place.
Tidy Up
Clean up all shared spaces. Make sure your guest has clean linens and towels.
Customer Support
Visit Help Center
https://www.airbnb.com/help?eal_exp=asdfasdf
Contact Airbnb
https://www.airbnb.com/help/contact_us?eal_exp=asdfasdf
Thanks,
The Airbnb Team
Email preferences
https://www.airbnb.com/users/notifications?eal_exp=asdfasdf
Airbnb
My code that works:
function getNumberofGuests(message_body) {
var num_guests = message_body.match("Guests[\r\n]+([^\r\n]+)")[1];
Logger.log("num_guests: " + num_guests);
return num_guests;
}
Logs -- num_guests: 13
The same code in a similar senario that doesn't work:
function getReservationID(message_body) {
var reservationID = message_body.match("Confirmation\scode[\r\n][^\r\n]+")[1];
Logger.log("reservationID: " + reservationID);
return reservationID;
Logs -- reservationID: null
PS
The formatting of the body in this display is off for some reason, and I tried for 30 minutes but still couldn't fix it. In the message_body, it should be a new line after "Check-in", "Checkout", "Guests", "Confirmation code", etc. - there is a new line after every element that is currently showing a space.
I also tried the space character regex, and still got null:
var regExp = new RegExp("Confirmation\scode[\s]^[^\s]+", 'g')
After taking a look at the code and trying it out, you're getting the null because of what you changed in the match method. The reason why num_guests works is because that it's set up in a way that looks for the word "Guests" and the next line is the result from the array (notice the [1] on the end of the line). That same concept/regex works for the confirmation code portion as well, but you put in the "\s" and changed the order of some parentheses. Since the search code is in double quotes, you don't need the "\s". Basically, you have "Confirmation\scode" when you want "Confirmation code". Although it works in regex101, trying in the Google Apps Script environment will produce actual results.
I loaded the data into a file and then loaded the file into variable dt in the following code:
function getMyData()
{
var ss=SpreadsheetApp.getActive();
var sh=ss.getActiveSheet()
var dt=myUtilities.loadFile('regex.txt');
var guests = dt.match(/^Guests (\d+)/m)[1];
var cf=dt.match(/^Confirmation code ([0-9A-Z]+)/m)[1];
var ui=HtmlService.createHtmlOutput(dt).append(Utilities.formatString('<br /><strong>Matches:</strong><br />Guests=%s<br />Confirmation Code=%s',guests,cf));
SpreadsheetApp.getUi().showModelessDialog(ui, 'Input Data & Extracted Parameters');
}
After playing with the regexs for a while I got this output which includes a copy of the data:
(The m flag is for multiline).
I missed some of the data the first time around.
Here's the new code with some of your additional parameters:
function getMyData()
{
var ss=SpreadsheetApp.getActive();
var sh=ss.getActiveSheet()
var dt=myUtilities.loadFile('regex.txt');
var guests = dt.match(/^Guests (\d+)/m)[1];
var cf=dt.match(/^Confirmation code ([0-9A-Z]+)/m)[1];
var chout=dt.match(/^Checkout (.*)$/m)[1];
var chin=dt.match(/^Trip details (.*)$/m)[1];
var payout=dt.match(/Guest Pays ([$.0-9]+)/m)[1];
var ui=HtmlService.createHtmlOutput(dt).append(Utilities.formatString('<br /><strong>Matches:</strong><br />Guests=%s<br />Confirmation Code=%s<br />Checkout=%s<br />Checkin=%s<br />Payout=%s',guests,cf,chout,chin,payout)).setWidth(1200);
SpreadsheetApp.getUi().showModelessDialog(ui, 'Input Data and Extracted Parameters');
}
And here's the output:
I'm guessing that you can figure out how to get the rest of them yourself.
I have a task: create a custom admin page in Sitecore to show FULL order history. I found a way to get order history per visitor, but couldn't find anything to get a full list of orders.
To get an order list per visitor we can use method
public virtual GetVisitorOrdersResult GetVisitorOrders(GetVisitorOrdersRequest request);
from class Sitecore.Commerce.Services.Orders.OrderServiceProvider
and assembly: Sitecore.Commerce
I think we can get all users and after that get orders for each user. However, I don't think that it is a best way to solve the task. I will appreciate if you advice any other way to get all data.
Thank you in advance for the help.
P.S. I am using Sitecore 8.
I think I found the solution
var contextManager = new CommerceServerContextManager(); //using Sitecore.Commerce.Connect.CommerceServer;
OrderManagementContext orderManagementContext = contextManager.OrderManagementContext;
var orderManager = orderManagementContext.PurchaseOrderManager;
CultureInfo culture = new CultureInfo("en-US");
DataSet searchableProperties = orderManager.GetSearchableProperties(culture.ToString());
SearchClauseFactory searchClauseFactory = orderManager.GetSearchClauseFactory(searchableProperties, "PurchaseOrder"); //using CommerceServer.Core; Assembly CommerceServer.Core.CrossTier
SearchClause searchClause = searchClauseFactory.CreateClause(ExplicitComparisonOperator.OnOrAfter, "Created", StartDate);
SearchOptions options = new SearchOptions();
options.SetPaging(10, 1);
var result = orderManager.SearchPurchaseOrders(searchClause, options);
Might be useful for somebody else.