private void processContainsSpecification( BoolQueryBuilder queryBuilder, ContainsPredicate<?> spec, Map<String, Object> variables ) { LOGGER.trace( "Processing ContainsSpecification {}", spec ); String name = spec.collectionProperty().toString(); if( spec.value() instanceof ValueComposite ) { // Query by complex property "example value" throw new UnsupportedOperationException( "ElasticSearch Index/Query does not support complex " + "queries, ie. queries by 'example value'." ); } else if( COMPLEX_TYPE_SUPPORTS.get( spec.value().getClass() ) != null ) { ComplexTypeSupport support = COMPLEX_TYPE_SUPPORTS.get( spec.value().getClass() ); queryBuilder.must( support.contains( spec, variables ) ); } else { Object value = resolveVariable( spec.value(), variables ); queryBuilder.must( termQuery( name, value ) ); } }
private void processContainsPredicate( final ContainsPredicate<?> predicate, StringBuilder builder ) { Object value = predicate.value(); String valueVariable = triples.addTriple( predicate.collectionProperty(), false ).value(); builder.append( this.createRegexStringForContaining( valueVariable, this.createAndEscapeJSONString( value ) ) ); }
private void processContainsPredicate( final ContainsPredicate<?> predicate, StringBuilder builder ) { Object value = predicate.value(); String valueVariable = triples.addTriple( predicate.collectionProperty(), false ).value(); builder.append( this.createRegexStringForContaining( valueVariable, this.createAndEscapeJSONString( value ) ) ); }
.s( DBNames.QNAME_TABLE_COLLECTION_PATH_TOP_LEVEL_NAME + ".*{1,}" ) ) ); Object value = predicate.value(); if( value instanceof Collection<?> )