Package org.apache.solr.client.solrj

Examples of org.apache.solr.client.solrj.SolrQuery.addSort()


            // Sort
            ORDER naturalSortOrder = ORDER.asc;
            if (q.getSortBy() != null) {
                for (SortBy sort : q.getSortBy()) {
                    if (sort.getPropertyName() != null) {
                        query.addSort(sort.getPropertyName().getPropertyName(), sort.getSortOrder()
                                .equals(SortOrder.ASCENDING) ? ORDER.asc : ORDER.desc);
                    } else {
                        naturalSortOrder = sort.getSortOrder().equals(SortOrder.ASCENDING) ? ORDER.asc
                                : ORDER.desc;
                    }
View Full Code Here


                    }
                }
            }

            // Always add natural sort by PK to support pagination
            query.addSort(getPrimaryKey(featureType.getTypeName()).getName(), naturalSortOrder);

            // Encode OGC filer
            FilterToSolr f2s = initializeFilterToSolr(featureType);
            String fq = this.field + ":" + featureType.getTypeName();
            Filter simplified = SimplifyingFilterVisitor.simplify(q.getFilter());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.