How to search twitter users by their description? - search

I am using twitter4j, I am interested to search a specific users by some words that exists in their description/Bio? is it possible to do that?
for example:
user that have the description: "full time developer...."
I want him to be retrieved by searching the word "developer"
searchByDescription("developer");
Is there any method to do it?

If you read the Twitter documentation you'll see that you can call users/search to get this information.
According to the Twitter4J documentation this is the searchUsers() function.

Related

Is there a way to show dynamic suggestion chips in dialogflow or dynamic list response?

I am trying to show stores to the user, but that stores need to be dynamic and should come from the database according to the user's current location.
User at Location1
user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location1, these are the stores near you.
Store1, Store2, Store3 (Suggestion Chips)
suppose if tomorrow the user is at a different location and ask the same question then he should be able to see other stores.
User at Location2
user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location2, these are the stores near you.
Store4, Store5, Store6 (Suggestion Chips)
I want to show these stores dynamically according to the user's location, in the form of suggestion chips, or in the form of list response.
Are you using a webhook? That would be the standard way of doing anything dynamic.
This codelab shows how to use the Dialogflow inline editor for dynamic responses.
You can use standard JavaScript to implement your decision logic and return dynamic suggestion chips.
If you want to get the users location, you need to use Permissions, there are neat helpers for that as well.
If you have more information on what you have tried so far, we can help you with more specific resources.

How to find out when user has enter wrong input when chatting with bot?

i am developing one Bot Framework related application in that i am showing like near by places for that user enter like this way "show me nearby places" here i am pass the key value "places" to google API and its producing the exact results, But here my question is when user enter wrong input like "show nearby places" and show places nearby me" at this time i want to show message "please enter correct input" for this how to show the user friendly message. please give the proper suggestion for me.
Thanks in advance.
You will have to use a NLP tool such as wit.ai, luis.ai or api.ai. The jury is out on which is the best tool so my advice will be to try out all and see for yourself.
You will essentially define stories and tell the NLP engine what the components of a statement are. So if you pass a statement to the NLP engine, it will parse the intents and objects to you.
For example your statement is "show me places nearby". Set your intent as 'nearby' and your entity as 'wit/location'. The tool should recognize variants of the above statement.
You can check out the recipe wit.ai have created for it here.
Else if you want just a string matching mechanism, check if your user's message has the substring 'location' and then show nearby places. Check out gupshup.io which has a Bot Builder that allows you to do this easily. (disclosure: I work there)

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.

Use EE Search Module to search custom fields

I'm sure this is something simple for which I just haven't found the documentation:
I have a website with a member directory. All of the member data is stored in a members channel, which uses a variety of custom fields – some of which are part of the P&T Field Pack.
I use a Safecracker form to enter the data, and it renders the custom fields beautifully:
What I want is essentially the same form, but have it perform a search, instead of enter the field data.
I've scoured the Search Module documentation, but can't find information on how to search individual fields, let alone how to render them. I've also searched the Safecracker documentation for how to configure it to search (the ideal solution).
How do I do this?
Any help would be appreciated.
Thanks!
ty
EE's search module won't do what you want - it's more of a general search tool, and its "Advanced search" form is less about custom fields and more about things like channels and categories.
You want to look at Solspace's Super Search. It's much more powerful, and will allow you to do exactly what you want in terms of your query - though you will have to build the form manually (i.e., you won't get the SafeCracker-style simplicity of using {field:field_name} to have your form fields output for you).
I would also recommend checking out SuperSearch.

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.

Resources