Comments (4)
Hey,
Which example does not work? Is it one of the shape examples on https://github.com/zouzias/spark-lucenerdd-examples?
from spark-lucenerdd.
Any time I try to follow the Geo or connective examples the imports do not
work
On Sep 15, 2016 00:38, "Anastasios Zouzias" [email protected]
wrote:
Hey,
Which example does not work? Is it one of the shape examples on
https://github.com/zouzias/spark-lucenerdd-examples?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#50 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAChu1Y2-sXEb-qspEmNwaJ4KWQGJMkCks5qqPYLgaJpZM4J9K63
.
from spark-lucenerdd.
Hey, you are right. The examples on the wiki were outdated. Now they are fixed.
scala> :paste
// Entering paste mode (ctrl-D to finish)
import org.zouzias.spark.lucenerdd.spatial.shape.ShapeLuceneRDD
import org.zouzias.spark.lucenerdd.spatial.shape._
import org.zouzias.spark.lucenerdd._
import org.zouzias.spark.lucenerdd.LuceneRDD
val df = sqlContext.read.format("com.databricks.spark.csv").option("header", "false").option("inferSchema", "true").option("delimiter", "\t").load("src/test/resources/spatial/CH.txt")
val swissCities = df.select("C0", "C1", "C5", "C4").map(row => ((row.getDouble(2), row.getDouble(3)), row.getString(1).toLowerCase()))
val shapes = ShapeLuceneRDD(swissCities)
shapes.count
// Exiting paste mode, now interpreting.
import org.zouzias.spark.lucenerdd.spatial.shape.ShapeLuceneRDD
import org.zouzias.spark.lucenerdd.spatial.shape._
import org.zouzias.spark.lucenerdd._
import org.zouzias.spark.lucenerdd.LuceneRDD
df: org.apache.spark.sql.DataFrame = [C0: int, C1: string, C2: string, C3: string, C4: double, C5: double, C6: string, C7: string, C8: string, C9: string, C10: string, C11: int, C12: int, C13: string, C14: int, C15: int, C16: int, C17: string, C18: string]
swissCities: org.apache.spark.rdd.RDD[((Double, Double), String)] = MapPartitionsRDD[12] at map at <console>:31
shapes: org.zouzias.spark.lucenerdd.spatial.shape.ShapeLuceneRDD[(Double, Double),String] = ShapeLuceneRDD[14] at RDD at ShapeLuceneRDD.scala:43
res0: Long = 49956
scala>
from spark-lucenerdd.
Many thanks for reporting the issues!
from spark-lucenerdd.
Related Issues (20)
- Exception "requirement failed: TopK requires at least K>0" with collect when no results are found HOT 1
- Store query that links the documents HOT 3
- Improve test coverage on Lucene Analyzers per field
- Remove dependency on sbt-spark-package HOT 2
- Support Scala 2.12 HOT 4
- Update to SBT 1.x HOT 1
- [Implicits] Support MapType for Spark DataFrames
- [question]want to knnSearch on for every record from other data frame - HOT 1
- Label Entity Linkage tasks using `sc.setJobGroup`
- Improve logging HOT 2
- Why is indexing entering a loop? HOT 4
- Weird results when running it distributed vs local HOT 5
- Help debugging a OOM issue when the search population increases HOT 3
- Question about blockdedup and call to count()
- Typesafe config is generating the error UTFDataFormatException: encoded string too long HOT 2
- Serialization Issue with org.apache.lucene.facet.FacetsConfig HOT 4
- RDD is removing null columns on fuzzy linking HOT 3
- How to search with lucenerdd in another queries' rdd? HOT 1
- Greatly improved linking performance
- Elasticsearch Snapshots? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-lucenerdd.