Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to elasticsearch client 0.19.9.

  • Loading branch information...
commit c9146f31f3afb3e4967761c04a733c029d8f25c0 1 parent 58d953d
@jonshea jonshea authored
View
4 build.sbt
@@ -1,6 +1,6 @@
name := "slashem"
-version := "0.15.4"
+version := "0.15.5"
organization := "com.foursquare"
@@ -27,7 +27,7 @@ libraryDependencies <++= (scalaVersion) { scalaVersion =>
"junit" % "junit" % "[4.8.2,)" % "test",
"com.novocode" % "junit-interface" % "[0.7,)" % "test" ,
"org.scala-tools.testing" %% "specs" % specsVersion % "test",
- "org.elasticsearch" % "elasticsearch" % "0.19.4" % "compile" exclude("log4j", "log4j") exclude("com.sun.jmx","jmxri") exclude("com.sun.jdmk","jmxtools") exclude("com.codahale","jerkson_2.8.1") exclude("com.codahale","jerkson") exclude("com.twitter","streamyj_2.8.1") exclude("org.codehaus.jackson" , "jackson-mapper-asl") exclude("org.codehas.jackson" , "jackson-core-asl"),
+ "org.elasticsearch" % "elasticsearch" % "0.19.9" % "compile" exclude("log4j", "log4j") exclude("com.sun.jmx","jmxri") exclude("com.sun.jdmk","jmxtools") exclude("com.codahale","jerkson_2.8.1") exclude("com.codahale","jerkson") exclude("com.twitter","streamyj_2.8.1") exclude("org.codehaus.jackson" , "jackson-mapper-asl") exclude("org.codehas.jackson" , "jackson-core-asl"),
"org.codehaus.jackson" % "jackson-mapper-asl" % "1.8.8",
"org.codehaus.jackson" % "jackson-core-asl" % "1.8.8",
"org.scala-tools.testing" %% "scalacheck" % scalaCheckVersion % "test",
View
4 src/main/scala/com/foursquare/slashem/Ast.scala
@@ -408,7 +408,7 @@ object Ast {
q.tieBreaker(1)
qf.map(f => {
- val basePhrase = EQueryBuilders.textPhraseQuery(f.fieldName, this.extend())
+ val basePhrase = EQueryBuilders.matchPhraseQuery(f.fieldName, this.extend())
val phraseQuery = f.weight match {
case 1.0 => basePhrase
case _ => basePhrase.boost(f.weight.toFloat)
@@ -517,7 +517,7 @@ object Ast {
q.tieBreaker(1)
q.add(normalq)
queriesToGen.map(pwf => {
- val basePhrase = EQueryBuilders.textPhraseQuery(pwf.fieldName, this.extend())
+ val basePhrase = EQueryBuilders.matchPhraseQuery(pwf.fieldName, this.extend())
val phraseQuery = pwf.weight match {
case 1 => basePhrase
case _ => basePhrase.boost(pwf.weight.toFloat)
View
8 src/main/scala/com/foursquare/slashem/Schema.scala
@@ -2,7 +2,6 @@
package com.foursquare.slashem
-
import com.foursquare.slashem.Ast._
import com.twitter.conversions.time._
import com.twitter.util.{Duration, ExecutorServiceFuturePool, Future, FuturePool, FutureTask, Promise}
@@ -12,7 +11,7 @@ import com.twitter.finagle.stats.StatsReceiver
import com.twitter.finagle.{Service, SimpleFilter}
import java.lang.Integer
import java.net.InetSocketAddress
-import java.util.{ArrayList, HashMap}
+import java.util.{ArrayList, Arrays, HashMap}
import java.util.concurrent.{Executors, ExecutorService}
import net.liftweb.common.{Box, Empty, Full}
import net.liftweb.record.{Record, OwnedField, Field, MetaRecord}
@@ -645,9 +644,8 @@ trait ElasticSchema[M <: Record[M]] extends SlashemSchema[M] {
Pair(annotedMap,
Some(doc.getHighlightFields().asScala
.mapValues(v => {
- val fragments: Array[String] = v.getFragments()
- val fragmentList: List[String] = Nil++fragments
- new ArrayList(fragmentList.asJava) }
+ val fragments = v.getFragments()
+ new ArrayList(Arrays.asList(fragments.toString)) }
)
.toMap))
}
Please sign in to comment.
Something went wrong with that request. Please try again.