This file contains 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
{ | |
"size" : 0, | |
"query" : { | |
"match" : { | |
"sire.id" : { | |
"query" : 46178, | |
"operator" : "OR", | |
"prefix_length" : 0, | |
"max_expansions" : 50, | |
"fuzzy_transpositions" : true, |
This file contains 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
@Path("create/schema") | |
@GET | |
public Response createSchema() throws JsonProcessingException { | |
SchemaFactoryWrapper visitor = new SchemaFactoryWrapper(); | |
mapper.acceptJsonFormatVisitor(ShopEntity.class, visitor); | |
JsonSchema schema = visitor.finalSchema(); | |
return Response.ok(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(schema)).build(); | |
} |
This file contains 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
//create exact match query | |
MultiMatchQueryBuilder multiMatchQueryBuilderExact = new MultiMatchQueryBuilder(this.searchValue, untouchedFields2) | |
multiMatchQueryBuilderExact.operator(MatchQueryBuilder.Operator.AND) | |
multiMatchQueryBuilderExact.type(MultiMatchQueryBuilder.Type.CROSS_FIELDS) |
This file contains 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
case "max": | |
case "offset": | |
case "name": | |
ArrayList<String> searchField = new ArrayList<>() | |
searchField.addAll(["name","firstName","postCode","customerNumber_str"]) | |
search.addEsQuery(new EsQuery(QType.MUST, searchField.toArray(), centralInformationService.convertToES(map.name).replace("#",""), SearchLevel.CROSSFIELDS)) | |
break; |
This file contains 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
defaultGrailsDomainClass.persistentProperties.each { | |
if (!AnnotationHelper.hasAnnotation(domainClass, it.name, JsonIgnore.class)) { | |
if (!AnnotationHelper.hasAnnotation(domainClass, it.name, Pedigree.class)) { | |
map.put(it.name, instance.getProperty(it.name)) | |
}else{ | |
if(instance.getProperty(it.name)) { | |
def sub = new JsonGenerator(instance.getProperty(it.name)) | |
map.put(it.name, sub.jacksonMap()) | |
} |
This file contains 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
{"et-sales":{"mappings":{"Contact":{"properties":{"addressError":{"type":"string"},"archive":{"type":"boolean"},"birthday":{"type":"date","format":"dateOptionalTime"},"blog":{"properties":{"contact":{"properties":{"id":{"type":"long"}}},"content":{"type":"string"},"dateCreated":{"type":"date","format":"dateOptionalTime"}}},"city":{"type":"string"},"class":{"type":"string"},"communicationError":{"type":"string"},"country":{"properties":{"name":{"type":"string"},"nameGerman":{"type":"string"}}},"dateLastUpdate":{"type":"date","format":"dateOptionalTime"},"firstName":{"type":"string","fields":{"sort":{"type":"string","index":"not_analyzed"}}},"flags":{"properties":{"dateCreated":{"type":"date","format":"dateOptionalTime"},"flag":{"properties":{"name":{"type":"string"}}}}},"fristName":{"type":"string","index":"no","fields":{"firstName":{"type":"string"},"sort":{"type":"string","index":"not_analyzed"}}},"gender":{"type":"long"},"lastUpdateBy":{"properties":{"id":{"type":"long"}}},"mailAddresses":{"properties":{"m |