Facebook search no longer contextualized? - search

up to a few days ago, when using Graph API search, the results were contextualized to the current user. For example, being logged in with my user so using my access token, calling a search with q=Massimo&type=user returned friends of mine named Massimo, followed by other people called Massimo, but friends of mine were above other results.
Today it just returns random people, the search seems not to be contextualized anymore.
Were there some changes? Are there new search options to get the contextualized results as opposed to generic ones? Was it a policy change for some reason? Or is it simply a side effect or a temporary problem?
TIA
EDIT:
Clarification : the search box inside the Facebook site itself, still returns contextualized content. Previously, a call to the search system via graph api returned more or less the same results, tailored to the user.

Search results are cached by query and not the user searching for something. That means the first time someone searches for something it's cached by facebook. Later, if someone else searches for the same thing, they will get similar results (not always tailored to their account). Privacy settings play a role (e.g. what information is visible and if the user can be searched). but in general, the results will be the same.
You can test this by searching for the same user using two different access tokens. The results will be relatively the same, even if one user is a friend and the other is not.
E.g. Using User A, search for User C (A and C are friends). Check the results.
Then, search for User C, but using User B (B and C are NOT friends). The results should be relatively the same (if not exactly the same.

Related

How to build a facebook-like fast search by starting of words?

I have to build a search textbox in a web page similar to facebook search box. Client side there will be ajax calls. The user need to search into around 300.000 elements that have a description of a few words or an alphanumeric code. When user enters the beginning of a word, a call is made to the server which return best match based on the starting of any word or code but also suggest first the elements most recently by the user, then by the group the user belongs to and finally from the entire set. Result can be limited to 10-20 items.
How can I build a fast search by key with the value just the description of the element? We use SQL server but any other DB could be OK.
The implementation at the time was very complex to summarise here but I came across recently to UI-select that solve the front end problem nicely and it's very good component if you are using Angular
https://github.com/angular-ui/ui-select
then backend you can put whatever you have (I did with Redis)

Sphinx "reverse" search

We have a website where users put up ads for stuff they want to sell, with parameters such as price, location, title and description. These can then be searched for using sphinx and allowing users to specify min- and maxprice, a location with a searchradius (using google maps) etc. Users can choose to save these searches and get emails when new ads appear that fit their search. Herein lies the problem: We want to perform a reverse search every time an ad is posted. With the price, location, title and description as parameters we want to search through all the saved "searches" and get the ones that would have found the ad. The min- and maxprice should just be performed in a query i suppose, and some Quorom syntax to get all ads with at least 2 or mby just 1 occurance in the title/description. Our problem lies mostly in the geo-search. How do we find all searches where the "search-circles" would include our newly posted location without performing a search for every saved search?
That is the main-question, any comment on our suggested solution to the other problems is also very welcome. Thank you in advance / Jenny
The standard 'geo-search' support on sphinx should work just as well on a Prospective Index, as a normal retrospective search.
Having built a sphinx 'index' of all the saved searches...
And you run a query using the 'ad' as the search query:- rather than the 'filter' using a fixed radius, you just use the radius from the attribute (ie the radius stored on the particular query) - if using the API cant use setFilterRange directly, need to use setSelect, to make a new virtual attribute.
$cl->setSelect("*,IF(#geodist<radius,1,0) as myfilter");
$cl->setFilter('myfilter',array(1));
(and yes, the min/maxprice can just be done with normal filters too - just inverting the logic to that you would use in a retrospective search)
... the complication is in the 'full-text' query, if the saved search is anything more than a single keyword, but you appear to have already figured out that part.

Facebook Place Search get no results of new places

After I create a new place on Facebook app, I use graph api to search the place with exact same location. However, I cannot get the place I just created even if I increase the distance to 1000 ft.
My search URL is as follow:
https://graph.facebook.com/search?type=place&center=25.091075, 121.55983449999997&distance=100&limit=100&offset=0&access_token=XXXX
In addition, if I add q="My Place" parameter, I can get the place.
Is it possible to get the new place information without parameter 'q=My Place'?
Most likely, it takes a while for Facebook's search service to index the new place. I would be very surprised if you still having trouble with this after a day or so.

Google-Analytics API to track Site Search?

So there's this nifty _trackPageview() api method on a tracker object, but is there a corresponding method that can be used to manually track a search? In other words, _trackPageview() reports to GA that a user hit a page. I want something like _trackSearch("terms") that would report to GA that a user searched for something.
Though not exactly what I was looking for, it seems that one can generate virtual page views to track search results programatically.
Suppose that you've set up a Site Search parameter called "q", so that when a URI is tracked that contains q=these+are+some+terms, GA will mark it as a search hit. One can use the _trackPageview() method to generate virtual search hits like so:
pageTracker._trackPageview('/custom/search?q=These+are+some+terms')
I pass search parameters by GET, so the URL for a search on "TEST" is
http://www.example.com/search?q=TEST
Selecting Content -> Site Search from my analytics account gives me a list of all keywords searched.
To learn more, check the documentation, especially the How do I set up Site Search for my profile? page.

SharePoint : Query list items added/ updated after user's last visit

We need to fetch the items added/updated after the user's last visit.
We need this information from 3 separate lists under the same web.
Pointers on how to accomplish this would be very helpful (and does SharePoint provide any API for this).
Kind regards,
Filtering by modified date is straightforward enough, though the method will depend on the type of view - the tricky part is getting the last login time - you're probably going to need a bit of custom code to save that.
Brute force would be to run a foreach on every version until you reach a version before the users last login date, and do this on every list item, and then again on every list. You can see which fields changed this way by seeing what changed between versions. You can narrow down the the set of items to do this on by only querying for ones with a modified date since the users last login
As for finding the users last login, sorry I can suggest anything for that. I've not looked for it before.

Resources