@Test public void defaultSearchContributionEscapesStartingSlash() { BoolQueryBuilder query = QueryBuilders.boolQuery(); String field = "name"; String value = "/foo"; defaultSearchContribution.contribute(query, field, value); assertThat(query.toString(), Matchers.containsString("\"query\" : \"\\\\/foo\"")); }
@Override public void contribute(final BoolQueryBuilder query, final String type, final String value) { if (value != null) { String escaped = escape(value); query.must(QueryBuilders.queryStringQuery(escaped).field(type).lowercaseExpandedTerms(false)); } }
DefaultSearchContribution extends SearchContributionSupport { @Override public void contribute(final BoolQueryBuilder query, final String type, final String value) { if (value != null) { String escaped = escape(value); query.must(QueryBuilders.queryStringQuery(escaped).field(type).lowercaseExpandedTerms(false)); } } }
DefaultSearchContribution extends SearchContributionSupport { @Override public void contribute(final BoolQueryBuilder query, final String type, final String value) { if (value != null) { String escaped = escape(value); query.must(QueryBuilders.queryStringQuery(escaped).field(type).lowercaseExpandedTerms(false)); } }  }
DefaultSearchContribution extends SearchContributionSupport { @Override public void contribute(final BoolQueryBuilder query, final String type, final String value) { if (value != null) { String escaped = escape(value); query.must(QueryBuilders.queryStringQuery(escaped).field(type).lowercaseExpandedTerms(false)); } }  @Override void contribute(final BoolQueryBuilder query, final String type, final String value); }
DefaultSearchContribution extends SearchContributionSupport { @Override public void contribute(final BoolQueryBuilder query, final String type, final String value) { if (value != null) { String escaped = escape(value); query.must(QueryBuilders.queryStringQuery(escaped).field(type).lowercaseExpandedTerms(false)); } }  @Override void contribute(final BoolQueryBuilder query, final String type, final String value); static final String NAME; }