Skip to content

Commit

Permalink
Adding support for Postgres Point + GeoJson LineString in Solr
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Oct 4, 2023
1 parent d0833f0 commit 946086f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/computate/frFR/java/EcrireGenClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -4719,7 +4719,7 @@ else if(entiteNomSimple.toString().equals("Point")) {
}
else if(entiteNomSimple.toString().equals("Path")) {
tl(3, "JsonArray pointsArray = new JsonArray();");
tl(3, "path.getPoints().stream().map(point -> new JsonArray().add(Double.valueOf(point.getX())).add(Double.valueOf(point.getY()))).collect(Collectors.toList()).forEach(pointArray -> pointsArray.add(pointArray));");
tl(3, entiteVar, ".getPoints().stream().map(point -> new JsonArray().add(Double.valueOf(point.getX())).add(Double.valueOf(point.getY()))).collect(Collectors.toList()).forEach(pointArray -> pointsArray.add(pointArray));");
tl(3, "doc.put(\"", entiteVar, (entiteDocValues ? "_docvalues" : (entiteStocke ? "_indexedstored" : "_indexed")), entiteSuffixeType, "\", new JsonObject().put(\"type\", \"LineString\").put(\"coordinates\", pointsArray).toString());");
}
else if(entiteNomSimple.toString().equals("JsonObject")) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/computate/frFR/java/IndexerClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -4344,6 +4344,11 @@ else if(entiteClasseParts != null && entiteClasseParts.getDocumentSolr() != null
indexerStockerSolr(classeLangueNom, entiteDoc, "entiteNomSimpleCompletGenerique", entiteClasseParts.nomSimpleGenerique(classeLangueNom));

if("Point".equals(entiteNomSimple)) {
classePartsGenAjouter(classePartsPointSerializer, classeLangueNom);
classePartsGenAjouter(classePartsPointDeserializer, classeLangueNom);
}

if("Path".equals(entiteNomSimple)) {
classePartsGenAjouter(ClasseParts.initClasseParts(this, "com.fasterxml.jackson.databind.ObjectMapper", classeLangueNom), classeLangueNom);
classePartsGenAjouter(ClasseParts.initClasseParts(this, "com.fasterxml.jackson.databind.module.SimpleModule", classeLangueNom), classeLangueNom);
classePartsGenAjouter(ClasseParts.initClasseParts(this, "com.fasterxml.jackson.databind.deser.BeanDeserializerModifier", classeLangueNom), classeLangueNom);
Expand All @@ -4352,11 +4357,6 @@ else if(entiteClasseParts != null && entiteClasseParts.getDocumentSolr() != null
classePartsGenAjouter(ClasseParts.initClasseParts(this, "com.fasterxml.jackson.databind.BeanDescription", classeLangueNom), classeLangueNom);
classePartsGenAjouter(ClasseParts.initClasseParts(this, "java.util.stream.Collectors", classeLangueNom), classeLangueNom);
classePartsGenAjouter(ClasseParts.initClasseParts(this, "io.vertx.core.json.Json", classeLangueNom), classeLangueNom);
classePartsGenAjouter(classePartsPointSerializer, classeLangueNom);
classePartsGenAjouter(classePartsPointDeserializer, classeLangueNom);
}

if("Path".equals(entiteNomSimple)) {
classePartsGenAjouter(ClasseParts.initClasseParts(this, "com.fasterxml.jackson.databind.ObjectMapper", classeLangueNom), classeLangueNom);
classePartsGenAjouter(classePartsPathSerializer, classeLangueNom);
classePartsGenAjouter(classePartsPathDeserializer, classeLangueNom);
Expand Down

0 comments on commit 946086f

Please sign in to comment.