List of usage examples for org.springframework.data.solr.core.query QueryParameter getValue
@Nullable Object getValue();
From source file:org.springframework.data.solr.core.DefaultQueryParser.java
private void addOptionToSolrQuery(SolrQuery solrQuery, QueryParameter option) { if (option != null && StringUtils.isNotBlank(option.getName())) { solrQuery.add(option.getName(), conversionService.convert(option.getValue(), String.class)); }//from w w w. j ava 2 s. com }
From source file:org.springframework.data.solr.core.DefaultQueryParser.java
private void addFieldSpecificParameterToSolrQuery(SolrQuery solrQuery, Field field, QueryParameter option) { if (option != null && field != null && StringUtils.isNotBlank(option.getName())) { if (option.getValue() == null) { solrQuery.add(createPerFieldOverrideParameterName(field, option.getName()), (String) null); } else {//ww w . j a v a 2 s.c o m String value = option.getValue().toString(); if (conversionService.canConvert(option.getValue().getClass(), String.class)) { value = conversionService.convert(option.getValue(), String.class); } solrQuery.add(createPerFieldOverrideParameterName(field, option.getName()), value); } } }