From 5cbd37fa574c5cfef269ebb640312c99749df5a1 Mon Sep 17 00:00:00 2001 From: Matt Hicks Date: Fri, 13 Dec 2024 17:48:34 -0600 Subject: [PATCH] Bug fixes to LuceneStore --- build.sbt | 2 +- lucene/src/main/scala/lightdb/lucene/LuceneStore.scala | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index f41df172..6bfaa1a7 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ val developerURL: String = "https://matthicks.com" name := projectName ThisBuild / organization := org -ThisBuild / version := "1.1.0" +ThisBuild / version := "1.2.0-SNAPSHOT" ThisBuild / scalaVersion := scala213 ThisBuild / crossScalaVersions := allScalaVersions ThisBuild / scalacOptions ++= Seq("-unchecked", "-deprecation") diff --git a/lucene/src/main/scala/lightdb/lucene/LuceneStore.scala b/lucene/src/main/scala/lightdb/lucene/LuceneStore.scala index c8b5ddc1..5652ab54 100644 --- a/lucene/src/main/scala/lightdb/lucene/LuceneStore.scala +++ b/lucene/src/main/scala/lightdb/lucene/LuceneStore.scala @@ -90,13 +90,6 @@ class LuceneStore[Doc <: Document[Doc], Model <: DocumentModel[Doc]](name: Strin json: Json, add: LuceneField => Unit): Unit = { field.className match { - case Some("lightdb.spatial.Geo.Point") => - val p = json.as[Geo.Point] - try { - add(new LatLonPoint(field.name, p.latitude, p.longitude)) - } catch { - case t: Throwable => throw new RuntimeException(s"Failed to add LatLonPoint(${field.name}, ${p.latitude}, ${p.longitude}): ${JsonFormatter.Default(json)}", t) - } case _ => def indexPoint(p: Geo.Point): Unit = try { LatLonShape.createIndexableFields(field.name, p.latitude, p.longitude) @@ -159,7 +152,7 @@ class LuceneStore[Doc <: Document[Doc], Model <: DocumentModel[Doc]](name: Strin if (json != Null) try { createGeoFields(field, json, add) } catch { - case t: Throwable => throw new RuntimeException(s"Failure to populate geo field '$name.${field.name}' for $doc (json: $json)", t) + case t: Throwable => throw new RuntimeException(s"Failure to populate geo field '$name.${field.name}' for $doc (json: $json, className: ${field.className})", t) } } else { d match {