Help > Federator > Connectors > Twitter

Twitter

The Twitter connector allows you to perform 'anonymous' (no Twitter user account required) searches using the public Twitter search service. Twitter searches may be limited in volume and weighted according to whatever Twitter deems important - for example, tweets that are both recent and popular. Twitter does not generally allow exhaustive searches of all historic tweets.

Most special symbols that are used in Twitter searches, such as the hash and at symbols, are passed through to the Twitter connector so that queries that typically work on Twitter's own public search site will work the same from within Perceptive Enterprise Search. Refer to Twitter's own instructions for more information about performing searches on Twitter.

The Twitter connector also performs some modifications to queries so that common Perceptive Enterprise Search idioms are translated to corresponding Twitter idioms. The table below explains the changes that are made.

Perceptive Enterprise SearchQuery Sent to Twitter
John IN authorauthor:John
dogs NOT catsdogs -cats
Setup

To create a Twitter connector, open the Perceptive Enterprise Search Administration Console:

  1. Click the Indexes link on the home page
  2. Click the New Index button
  3. Select Federated Source and click the Next button
  4. Select Twitter and click the Next button
  5. Enter the maximum number of results that you would like each Twitter search to return and click the Next button.
  6. Enter a search phrase and click the Test button to ensure that Perceptive Enterprise Search can access Twitter. If this test fails ensure that you can perform Twitter searches from a web browser on the same machine using Twitter's own website.
  7. Finally, give the index a descriptive name and click Finish.
Configuration

You can edit the Twitter.xml configuration file to create mappings from the usual Perceptive Enterprise Search keywords to Twitter-specific keywords.

	<!-- Map -->
	<property name="Map.author" value="from"/>
	

In the above excerpt from Twitter.xml, a mapping has been created from the Perceptive Enterprise Search "from" keyword to the Twitter "author" keyword. This allows users to perform a search for John IN from and effectively perform a Twitter search where John is the author of the tweet. You may add additional mappings to this file, ensuring that the name item always starts with "Map.".