This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration jobConf = new Configuration(); | |
jobConf.set("xmlinput.start", "<Start>"); | |
jobConf.set("xmlinput.end", "</Start>"); | |
Configuration itemConf = new Configuration(); | |
itemConf.set("mongo.output.uri", "mongodb://localhost:27017/db.collection"); | |
Configuration itemConf2 = new Configuration(); | |
itemConf2.set("mongo.output.uri", "mongodb://localhost:27017/db.collection2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.BasicDBObject; | |
import com.mongodb.DBCollection; | |
import com.mongodb.DBObject; | |
import com.mongodb.MongoException; | |
import com.mongodb.hadoop.MongoOutput; | |
import com.mongodb.hadoop.io.BSONWritable; | |
import com.mongodb.hadoop.io.MongoUpdateWritable; | |
import com.mongodb.hadoop.output.MongoRecordWriter; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JavaPairRDD<LongWritable, Text> records = ctx.newAPIHadoopFile("path.xml", XmlInputFormat.class, LongWritable.class, Text.class, jobConf); | |
JavaPairRDD<String, String> words = records.map(new PairFunction<Tuple2<LongWritable, Text>, LongWritable, Text>() { | |
@Override | |
public Tuple2<Text,Text> call(Text line) { | |
System.out.println(line); | |
return new Tuple2("",""); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /my_index/_analyze?analyzer=search_keyword_analyzer&text=re/max | |
{ | |
"tokens": [ | |
{ | |
"token": "r", | |
"start_offset": 0, | |
"end_offset": 6, | |
"type": "word", | |
"position": 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 1, | |
"searchId": "63fffacb209cef6ad958a10b01f43b70", | |
"listingCategory": "For Sale", | |
"propertyType": "Any", | |
"neigborhood": "East Little Havana", | |
"city": "Miami", | |
"state": "FL", | |
"stateFull": "Florida", | |
"searchString": "East Little Havana, Miami, FL", //this was changed from location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"index":{"_index":"autocompletecities","_type":"city"}} | |
{"city":"Adak","state":"AK","suggestCity":{"output":"Adak, AK","input":["Adak","Adak AK","Adak, AK"],"weight":0,"payload":{"lat":51.88214,"lon":-176.59993}},"location":{"lat":51.88214,"lon":-176.59993}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config | |
input { | |
file { | |
type => "application-error" | |
path => "E:/wamp/logs/application-error.log" | |
tags => [ "hubdin-error", "application-error" ] | |
codec => json | |
} | |
file { | |
type => "application-info" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"listings": [ | |
{ | |
"id": 42, | |
"listingId": 1212995, | |
"address": "2020 N BAYSHORE DR # 2110", | |
"city": "Miami", | |
"state": "FL", | |
"zipcode": "33137", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#area | |
{ | |
"area": [ | |
{ | |
"id": 13 | |
}, | |
{ | |
"id": 14 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array | |
( | |
[query] => Array | |
( | |
[filtered] => Array | |
( | |
[query] => Array | |
( | |
[match_all] => Array | |
( |