This file contains hidden or 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
implicit def createRecommenderInput(job: Job) = new { | |
def toInput: Input = { | |
val input = new Input ( | |
title = job.title, | |
disciplines = Set.empty, // TODO get job.disciplines | |
industries = Set.empty, // TODO get job.industries | |
positionLevel = 24, // TODO get job.positionLevel | |
salaryMin = -1, // TODO get job.salaryMin | |
salaryMax = -1 // TODO get job.salaryMax | |
) |
This file contains hidden or 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
java.lang.RuntimeException: play.api.libs.json.JsResultException: JsResultException(errors:List((/jobSeeker/careerTarget/positionLevel,List(ValidationError(error.path.missing,WrappedArray()))))) | |
at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:87) | |
at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:58) | |
at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:62) | |
at backtype.storm.daemon.executor$fn__4050$fn__4059$fn__4106.invoke(executor.clj:658) | |
at backtype.storm.util$async_loop$fn__465.invoke(util.clj:377) | |
at clojure.lang.AFn.run(AFn.java:24) | |
at java.lang.Thread.run(Thread.java:724) | |
Caused by: play.api.libs.json.JsResultException: JsResultException(errors:List((/jobSeeker/careerTarget/positionLevel,List(ValidationError(error.path.missing,WrappedArray()))))) | |
at play.api.libs.json.JsValue$$anonfun$2.apply(JsValue.scala:64) |
This file contains hidden or 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
def addToIndex(docs: Iterable[EsDoc]): Unit = { | |
for (doc <- docs) { | |
client.execute { | |
index into resource fields (doc.data) | |
} | |
} | |
client.admin.cluster.prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet | |
refresh(indexName) |
This file contains hidden or 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
public class JaccardScoreScript extends AbstractDoubleSearchScript | |
{ | |
private final ESLogger logger = Loggers.getLogger(JaccardScoreScript.class); | |
private final double coefficient; | |
private final String docItemField; | |
private final String docItemScoreField; | |
private final List<Long> queryItems; | |
private final List<Double> queryItemScores; | |
private final boolean zero; |
NewerOlder