Skip to content
Browse files

use twitter4j 2.5 snapshot version as its the only version that works…

… with the change of the endpoint
  • Loading branch information...
1 parent 7fb32a0 commit 8c776bee976f85ea880cec62c1561c76c49eafe6 @kimchy kimchy committed Oct 14, 2011
View
7 .idea/modules/plugin-river-twitter.iml
@@ -15,12 +15,11 @@
<orderEntry type="module-library">
<library name="twitter4j">
<CLASSES>
- <root url="jar://$GRADLE_REPOSITORY$/org.twitter4j/twitter4j-core/jars/twitter4j-core-2.1.10.jar!/" />
+ <root url="jar://$GRADLE_REPOSITORY$/org.twitter4j/twitter4j-stream/jars/twitter4j-stream-2.2.5-SNAPSHOT.jar!/" />
+ <root url="jar://$GRADLE_REPOSITORY$/org.twitter4j/twitter4j-core/jars/twitter4j-core-2.2.5-SNAPSHOT.jar!/" />
</CLASSES>
<JAVADOC />
- <SOURCES>
- <root url="jar://$USER_HOME$/opt/twitter4j/2.1.10/twitter4j-core/twitter4j-core-2.1.10-sources.jar!/" />
- </SOURCES>
+ <SOURCES />
</library>
</orderEntry>
<orderEntry type="module" module-name="test-testng" scope="TEST" />
View
12 plugins/river/twitter/build.gradle
@@ -30,13 +30,17 @@ configurations {
}
}
+repositories {
+ mavenRepo urls: 'http://twitter4j.org/maven2'
+}
+
dependencies {
compile project(':elasticsearch')
- compile('org.twitter4j:twitter4j-core:2.2.4') { transitive = false }
- compile('org.twitter4j:twitter4j-stream:2.2.4') { transitive = false }
- compile('org.twitter4j:twitter4j-core:2.2.4') { transitive = false }
- compile('org.twitter4j:twitter4j-stream:2.2.4') { transitive = false }
+ compile('org.twitter4j:twitter4j-core:2.2.5-SNAPSHOT') { transitive = false }
+ compile('org.twitter4j:twitter4j-stream:2.2.5-SNAPSHOT') { transitive = false }
+ compile('org.twitter4j:twitter4j-core:2.2.5-SNAPSHOT') { transitive = false }
+ compile('org.twitter4j:twitter4j-stream:2.2.5-SNAPSHOT') { transitive = false }
}
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
View
8 plugins/river/twitter/src/main/java/org/elasticsearch/river/twitter/TwitterRiver.java
@@ -265,8 +265,8 @@
}
currentRequest = client.prepareBulk();
if (streamType.equals("filter") || filterQuery != null) {
-
- stream.filter(filterQuery);
+
+ stream.filter(filterQuery);
} else if (streamType.equals("firehose")) {
stream.firehose(0);
@@ -416,7 +416,9 @@ private void reconnect() {
for (URLEntity url : status.getURLEntities()) {
if (url != null) {
builder.startObject();
- builder.field("url", url.getURL().toExternalForm());
+ if (url.getURL() != null) {
+ builder.field("url", url.getURL().toExternalForm());
+ }
if (url.getDisplayURL() != null) {
builder.field("display_url", url.getDisplayURL());
}

0 comments on commit 8c776be

Please sign in to comment.
Something went wrong with that request. Please try again.