is there a way to filter devices list - android-management-api

i'm using android management api and i can limit fields returned but i do not find a way to filter query results.
for example, is there a way with enterprises.devices.list method to get only devices matching one specific policy or hardware brand?
https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/list

Currently there is no way to filter the result when using enterprises.devices.list as it will list all devices assigned on the given enterprise.

Related

Elastic Search and Search Ranking Models

I am new to Elastic Search. I would like to know if the following steps are how typically people use ES to build a search engine.
Use Elastic Search to get a list of qualified documents/results based on a user's input.
Build and use a search ranking model to sort this list.
Use this sorted list as the output of the search engine to the user.
I would probably add a few steps
Think about your information model.
What kinds of documents are you indexing?
What are the important fields and what field types are they?
What fields should be shown in the search result?
All this becomes part of your mapping
Index documents
Are the underlying data changing or can you index it just once?
How are you detecting new docuemtns/deletes/updates?
This will be included in your connetors, that can be set up in multiple ways, for example using the Documents API
A bit of trial and error to sort out your ranking model
Depending on your use case, the default ranking may be enough.
have a look at the Search API to try out different ranking.
Use the search result list to present the results to the end user

Netsuite and Scribe Online - Filtering

I am using Scribe Online as an integration service, facilitating the exchange of data between Netsuite and IBM Cloud (formerly SilverPop). In Scribe it's possible to filter the queries made to Netsuite and so narrow the data retrieved.
While I can set the filter to fetch records where e.g. 'internalid is greater than 100;' the condition where 'internalid is less than 100' is not supported; and using a date produces similar result. It seems that 'less than' is not supported and Scribe Support suggest this may be a limitation of Netsuite's API.
How can I filter within a range of criteria e.g. a date range or a numerical range?
Does Netsuite's API limit this kind of filtering or are there ways to achieve it?
I am not familiar with Scribe, but here is how this is accomplished within NetSuite itself.
To compare an Internal ID as a number, you need to use the field internalidnumber instead of internalid. internalid is a String, so the less than operator isn't applicable.
Dates use very different operators. Instead of less, for Dates you would use operators like between, before, after, onorbefore, onorafter. There is a NetSuite Help document titled Search Operators that enumerates all possible search operators and which types of fields they apply to.

Per user behavior based scoring in Elasticsearch

We do understand the behavior of user by analyzing the tags he usually search for.
Now we need to give higher precedence for such tags for these users. I would like to know how we can achieve this using Elasticsearch in an elegant manner.
Well the best approach for this would be to
Analyse the behavior of the user
See which all keywords are of his interests
Maintain one document per user in another index which have all these keywords.
On the searches for that user , boost the occurrence of these keywords using function_score query
You can use terms filter inside boost function to achieve this.Add the boost function under functions in the function score query
In terms filter , you can point to this users document and get the values dynamically
Use custom filter key so that the cache key constructed wont eat too much memory
In this approach , you can avoid lots of code paths in client code.

Admin SDK Drive Activity Log doc_title partial matches?

I'm using the Google Admin SDK to query the Drive Activity Log using the following URL as the basis for the query:
https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive?maxResults=1000&filters=doc_title==Design
It successfully finds documents whose title is "Design". But I'm trying to query for documents whose titles contain the word "Design" (like it does in the Admin GUI.
Is there a way to accomplish this? (I'd rather not just query everything, then filter on my side if possible)
No, as per the reference documentation there is no filter operator for "contains" matching:
https://developers.google.com/admin-sdk/reports/v1/reference/activities/list#filters

google place api Incorrect Results

Hi I have a problem with displaying the results of a google place api
When I write nightclub Google search I get results that match my search
But when I search through google place api I get the results is not so correct as Bookstore, apartments for rent and other results not so related
The URL looks like this
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.0768214,34.8147987&radius=5000&keyword=Nightclub&sensor=true&language=en&key=MyKey
Thank you!
As the docs state:
keyword — A term to be matched against all content that Google has indexed for this Place, including but not limited to name, type, and address, as well as customer reviews and other third-party content.
So that filter isn't going to be quite as specific as you would like. If you only want to get night clubs, you can use the types param with a value of night_club. See Supported Place Types for all of the other possible values.

Resources