Package org.springframework.data.solr.core.query

Examples of org.springframework.data.solr.core.query.Field


      solrQuery.add(StatsParams.STATS_FACET, field.getName());
    }

    for (Entry<Field, Collection<Field>> entry : statsOptions.getSelectiveFacets().entrySet()) {

      Field field = entry.getKey();
      String prefix = CommonParams.FIELD + "." + field.getName() + ".";

      String paramName = prefix + StatsParams.STATS_FACET;
      for (Field facetField : entry.getValue()) {
        solrQuery.add(paramName, facetField.getName());
      }
View Full Code Here


    if (CollectionUtils.isNotEmpty(response.getFacetFields())) {
      int initalPageSize = query.getFacetOptions().getPageable().getPageSize();
      for (FacetField facetField : response.getFacetFields()) {
        if (facetField != null && StringUtils.hasText(facetField.getName())) {
          Field field = new SimpleField(facetField.getName());
          if (CollectionUtils.isNotEmpty(facetField.getValues())) {
            List<FacetFieldEntry> pageEntries = new ArrayList<FacetFieldEntry>(initalPageSize);
            for (Count count : facetField.getValues()) {
              if (count != null) {
                pageEntries.add(new SimpleFacetFieldEntry(field, count.getName(), count.getCount()));
View Full Code Here

  @Test
  public void testGetGroupResultField() {
    @SuppressWarnings("unchecked")
    GroupResult<Object> gr = new SimpleGroupResult<Object>(1, null, "name", Mockito.mock(Page.class));

    Field field = Mockito.mock(Field.class);
    Mockito.when(field.getName()).thenReturn("name");

    Map<Object, GroupResult<Object>> groupResultMap = new HashMap<Object, GroupResult<Object>>();
    groupResultMap.put("name", gr);

    SolrResultPage<Object> result = new SolrResultPage<Object>(Collections.emptyList());
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.query.Field

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.