Changeset 4516
- Timestamp:
- 02/14/14 08:58:35 (10 years ago)
- Location:
- vlo/branches/vlo-3.0/vlo-web-app
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-web-app/pom.xml
r4505 r4516 223 223 </plugins> 224 224 </build> 225 225 226 <reporting> 227 <plugins> 228 <plugin> 229 <groupId>org.codehaus.mojo</groupId> 230 <artifactId>cobertura-maven-plugin</artifactId> 231 <version>2.6</version> 232 </plugin> 233 </plugins> 234 </reporting> 235 226 236 <repositories> 227 237 <repository> -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/impl/SolrQueryFactoryImpl.java
r4513 r4516 22 22 import eu.clarin.cmdi.vlo.pojo.FacetSelection; 23 23 import java.util.ArrayList; 24 import java.util.Collection; 24 25 import java.util.List; 25 26 import org.apache.solr.client.solrj.SolrQuery; … … 38 39 public SolrQueryFactoryImpl(VloConfig config) { 39 40 this.config = config; 40 41 41 42 // create the query used to count facets (will never change) 42 43 countQuery = getDefaultFacetQuery(); 43 44 countQuery.setRows(0); 44 45 } 45 46 46 47 @Override 47 48 public SolrQuery createFacetQuery(List<FacetSelection> selections, String queryString) { … … 57 58 final List<String> encodedQueries = new ArrayList(selections.size()); 58 59 for (FacetSelection selection : selections) { 59 String facet = selection.getFacet().getName(); 60 for (String value : selection.getValue()) { 61 encodedQueries.add(String.format("%s:%s", facet, ClientUtils.escapeQueryChars(value))); 60 final String facetName = selection.getFacet().getName(); 61 final Collection<String> values = selection.getValue(); 62 if (values != null) { 63 for (String value : values) { 64 encodedQueries.add(String.format("%s:%s", facetName, ClientUtils.escapeQueryChars(value))); 65 } 62 66 } 63 67 }
Note: See TracChangeset
for help on using the changeset viewer.