Searching/Filtering users using Graph Api - microsoft-graph-api

Is it possible to construct a single filter query to retrieve all users whose names start with the letter "m" and who have the "Manager" role?

Related

Firebase realtime database Rules to filter lists

I want to save some stuff on a firebase real time database and only allow users access to elements that contain certain values.
More specificly i want to have events as a list and users saved as a list:
-users have their uid and roles (e.g. "admin" , "any" , etc)
-events have some data that should only be allowed for users that have one or more of the specified roles
How would i go and filter the list using rules?
Ok so thanks to Frank van Puffelen i do now know that what i wanted to do (wich was filter data cia rules) does not work

Parse iOS SDK: Select columns from compound query

I'm using the Parse iOS SDK to pull data from my Parse backend. What I would like todo is create a compound query, so a query with a subquery as a where condition, but also have it bubble up properties from the subquery.
For example, lets say I have an object called car and I have an object called dealership. Now I want to pull the dealership that a particular car is located at based on some query parameters. This is where the compound query comes in.
I know how to create the compound query to only return cars that belong to a particular dealership, but how would I return the "name" property from the dealership object on my car object?
The idea here is to mimic a left join in SQL to return data from a joined table.
Any ideas how one would do this?

Elasticsearch -> Search on index with different types

Created Elasticsearch Index and under this index, I have stored 3-4 types. Now I want to search on index and want to give preference/score/boost for types. Means when I search on index, want to search on specific types first and then on other types.
Suppose, there are company index - user, accessories are types under company.
So, when I search on company index firstly i want to search in user type and then into accessories. Is there any way in elasticsearch so can I apply preference in query?
Also I want to apply pagination to result thats why I don't want to query separately on type search. I am doing this without tire.
Any solution?

Neo4j - Searching from an array of nodes

In my situation I've a bunch of nodes that represent the users
and they have relation to books they read.
This user have a property that says where they are from, and I added them to an index, based on their country.
So I would like to search in the index for users from one country, and list the books that people from there read more, some sorting by grouping.
could any one give me a help how to do this?
I'm having some trouble getting users from the index, and doing the query
Couple of assumptions based on your descriptions:
users have a country property, it contains e.g. France as value
you have a index called users and you store the user node's country property there
relationship type to connect users and books is READ
book nodes have a title property
Based on these assumptions the cypher query would look like:
start user=node:users(country='France')
match user-[:READ]->book
return book.title, count(*) as rank
order by rank desc
limit 20
side note: best approach to ask this kind of questions is to create a sample graph on http://console.neo4j.org and share your setup on SO.

Rails query where array attribute contains overlap with other array

I have a model called Listing that represents a listing for an apartment sublet. These sublets can be rented out for different terms (summer, winter, etc). And so, the term for each sublet is stored as a serialized string. (I know this isn't the best way but i'm trying to get this app up) I am creating a filter function for these listings, so users can select what attributes they want in a listing and display the results that match the filter. I am having trouble, however, with the term part. Users can check off which terms they want the listing to be available for, and so this is stored in a serialized array as well. Using rails orm how can I do
listing=listing.where("term contains value(s) from input term")
basically I want this to return listings where the users preferred terms has atleast one overlap with the listings terms.
i.e. if a listing has terms of summer session 1 and winter and the user selects summer session 1 and spring, that listing should be returned.
Anyone have any ideas??
This is what you're looking for:
listings = Listing.where('term in (?)', terms)
or you can just do:
listings = Listing.where(:term => terms)

Resources