/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/ |
H A D | SortSpec.java | 29 Sort sort; field in class:SortSpec 33 public SortSpec(Sort sort, int num) { argument 34 this(sort,0,num); 37 public SortSpec(Sort sort, int offset, int num) { argument 38 this.sort=sort; 45 sort = s; 48 public static boolean includesScore(Sort sort) { argument 49 if (sort==null) return true; 50 for (SortField sf : sort [all...] |
H A D | QueryResultKey.java | 26 /** A hash key encapsulating a query, a list of filters, and a sort 31 final Sort sort; field in class:QueryResultKey 41 public QueryResultKey(Query query, List<Query> filters, Sort sort, int nc_flags) throws IOException { argument 43 this.sort = sort; 51 sfields = (this.sort !=null) ? this.sort.getSort() : defaultSort;
|
H A D | LuceneQParserPlugin.java | 36 * <br>Example: <code>{!lucene q.op=AND df=text sort='price asc'}myfield:foo +bar -baz</code> 100 // handle legacy "query;sort" syntax 107 // sort may be legacy form, included in the query string 117 throw new ParseException("If you want to use multiple ';' in the query, use the 'sort' param."); 128 SortSpec sort = super.getSort(useGlobal); 129 if (sortStr != null && sortStr.length()>0 && sort.getSort()==null) { 132 sort.sort = oldSort; 135 return sort;
|
/lucene-3.6.0/solr/core/src/test/org/apache/solr/search/ |
H A D | QueryParsingTest.java | 75 Sort sort; 79 sort = QueryParsing.parseSort("score desc", req); 80 assertNull("sort", sort);//only 1 thing in the list, no Sort specified 82 sort = QueryParsing.parseSort("score asc", req); 83 SortField[] flds = sort.getSort(); 87 sort = QueryParsing.parseSort("weight desc", req); 88 flds = sort.getSort(); 92 sort = QueryParsing.parseSort("weight desc,bday asc", req); 93 flds = sort [all...] |
/lucene-3.6.0/lucene/contrib/remote/src/test/org/apache/lucene/search/ |
H A D | TestRemoteSort.java | 52 private Sort sort; field in class:TestRemoteSort 56 // the contents field is used to search and sort by relevance 57 // the int field to sort by int 58 // the float field to sort by float 59 // the string field to sort by string 156 sort = new Sort(); 234 sort = new Sort(); 235 assertSameValues (scoresX, getScores (remote.search (queryX, null, 1000, sort).scoreDocs, remote)); 236 assertSameValues (scoresY, getScores (remote.search (queryY, null, 1000, sort).scoreDocs, remote)); 237 assertSameValues (scoresA, getScores (remote.search (queryA, null, 1000, sort) 346 assertMatches(Searcher searcher, Query query, Sort sort, String expectedResult) argument [all...] |
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/ |
H A D | TestSort.java | 78 private Sort sort; field in class:TestSort 86 // the contents field is used to search and sort by relevance 87 // the int field to sort by int 88 // the float field to sort by float 89 // the string field to sort by string 115 // the sort order of Ø versus U depends on the version of the rules being used 241 sort = new Sort(); 261 sort = new Sort(); 262 assertMatches (full, queryX, sort, "ACEGI"); 263 assertMatches (full, queryY, sort, "BDFH [all...] |
H A D | TestTopDocsMerge.java | 154 final Sort sort; 157 sort = null; 163 sort = new Sort(randomSortFields); 170 System.out.println("TEST: search query=" + query + " sort=" + sort + " numHits=" + numHits); 175 if (sort == null) { 178 final TopFieldCollector c = TopFieldCollector.create(sort, numHits, true, true, true, random.nextBoolean()); 200 if (sort == null) { 203 final TopFieldCollector c = TopFieldCollector.create(sort, numHits, true, true, true, random.nextBoolean()); 221 final TopDocs mergedHits = TopDocs.merge(sort, numHit [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/ |
H A D | TestSort.java | 72 private Sort sort; field in class:TestSort 80 // the contents field is used to search and sort by relevance 81 // the int field to sort by int 82 // the float field to sort by float 83 // the string field to sort by string 109 // the sort order of Ø versus U depends on the version of the rules being used 236 sort = new Sort(); 256 sort = new Sort(); 257 assertMatches (full, queryX, sort, "ACEGI"); 258 assertMatches (full, queryY, sort, "BDFH [all...] |
H A D | TestTopDocsMerge.java | 154 final Sort sort; 157 sort = null; 163 sort = new Sort(randomSortFields); 170 System.out.println("TEST: search query=" + query + " sort=" + sort + " numHits=" + numHits); 175 if (sort == null) { 178 final TopFieldCollector c = TopFieldCollector.create(sort, numHits, true, true, true, random.nextBoolean()); 200 if (sort == null) { 203 final TopFieldCollector c = TopFieldCollector.create(sort, numHits, true, true, true, random.nextBoolean()); 221 final TopDocs mergedHits = TopDocs.merge(sort, numHit [all...] |
/lucene-3.6.0/solr/client/ruby/solr-ruby/lib/solr/request/ |
H A D | dismax.rb | 20 @sort_values = params.delete(:sort) 39 hash[:sort] = @sort_values.collect do |sort| 40 key = sort.keys[0] 41 "#{key.to_s} #{sort[key] == :descending ? 'desc' : 'asc'}"
|
H A D | standard.rb | 15 VALID_PARAMS = [:query, :sort, :default_field, :operator, :start, :rows, :shards, 49 hash[:sort] = @params[:sort].collect do |sort| 50 key = sort.keys[0] 51 "#{key.to_s} #{sort[key] == :descending ? 'desc' : 'asc'}" 52 end.join(',') if @params[:sort] 72 hash["facet.sort"] = (@params[:facets][:sort] == :count) if @params[:facets][:sort] [all...] |
/lucene-3.6.0/solr/client/ruby/solr-ruby/test/unit/ |
H A D | dismax_request_test.rb | 19 request = Solr::Request::Dismax.new(:query => 'query', :phrase_slop => '1000', :sort => [{:deedle => :descending}]) 23 assert_match(/sort=deedle%20desc/, request.to_s)
|
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/ |
H A D | QueryCommand.java | 40 private Sort sort; field in class:QueryCommand.Builder 47 public Builder setSort(Sort sort) { argument 48 this.sort = sort; 99 if (sort == null || query == null || docSet == null || docsToCollect == null) { 103 return new QueryCommand(sort, query, docsToCollect, needScores, docSet, queryString); 108 private final Sort sort; field in class:QueryCommand 118 private QueryCommand(Sort sort, Query query, int docsToCollect, boolean needScores, DocSet docSet, String queryString) { argument 119 this.sort = sort; [all...] |
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/suggest/fst/ |
H A D | ExternalRefSorter.java | 34 private final Sort sort; field in class:ExternalRefSorter 40 * Will buffer all sequences to a temporary file and then sort (all on-disk). 42 public ExternalRefSorter(Sort sort) throws IOException { argument 43 this.sort = sort; 61 sort.sort(input, sorted); 68 sort.getComparator()); 138 return sort.getComparator();
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/util/ |
H A D | TestCollectionUtil.java | 40 Collections.sort(list2); 46 Collections.sort(list2, Collections.reverseOrder()); 50 Collections.sort(list2); 59 Collections.sort(list2); 65 Collections.sort(list2, Collections.reverseOrder()); 69 Collections.sort(list2); 78 Collections.sort(list2); 84 Collections.sort(list2, Collections.reverseOrder()); 88 Collections.sort(list2);
|
H A D | TestArrayUtil.java | 120 Arrays.sort(a2); 126 Arrays.sort(a2, Collections.reverseOrder()); 130 Arrays.sort(a2); 143 // This is a test for LUCENE-3054 (which fails without the merge sort fall back with stack overflow in most cases) 149 Arrays.sort(a2); 159 Arrays.sort(a2); 165 Arrays.sort(a2, Collections.reverseOrder()); 169 Arrays.sort(a2); 178 Arrays.sort(a2); 184 Arrays.sort(a [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/util/ |
H A D | TestCollectionUtil.java | 40 Collections.sort(list2); 46 Collections.sort(list2, Collections.reverseOrder()); 50 Collections.sort(list2); 59 Collections.sort(list2); 65 Collections.sort(list2, Collections.reverseOrder()); 69 Collections.sort(list2); 78 Collections.sort(list2); 84 Collections.sort(list2, Collections.reverseOrder()); 88 Collections.sort(list2);
|
H A D | TestArrayUtil.java | 120 Arrays.sort(a2); 126 Arrays.sort(a2, Collections.reverseOrder()); 130 Arrays.sort(a2); 143 // This is a test for LUCENE-3054 (which fails without the merge sort fall back with stack overflow in most cases) 149 Arrays.sort(a2); 159 Arrays.sort(a2); 165 Arrays.sort(a2, Collections.reverseOrder()); 169 Arrays.sort(a2); 178 Arrays.sort(a2); 184 Arrays.sort(a [all...] |
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/util/collections/ |
H A D | IntArray.java | 41 * A flag which indicates whether a sort should occur of the array is 47 * Construct a default IntArray, size 0 and surly a sort should not occur. 86 sort(); 87 other.sort(); 175 sort(); 176 array.sort(); 191 public void sort() { method in class:IntArray 194 Arrays.sort(data, 0, size);
|
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ |
H A D | SearchWithSortTask.java | 25 * Does sort search on specified field. 32 private Sort sort; field in class:SearchWithSortTask 76 throw new RuntimeException("You must specify the sort type ie page:int,subject:string"); 89 this.sort = new Sort(sortFields); 111 throw new RuntimeException("Unrecognized sort field type " + typeString); 158 if (sort == null) { 159 throw new IllegalStateException("No sort field was set"); 161 return sort;
|
/lucene-3.6.0/solr/core/src/test/org/apache/solr/util/ |
H A D | PrimUtilsTest.java | 34 return b - a; // sort in reverse 44 PrimUtils.sort(start, end, a, comparator); 45 Arrays.sort(b, start, end);
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/ |
H A D | Searcher.java | 43 * <code>sort</code>. 52 Sort sort) throws IOException { 53 return search(createNormalizedWeight(query), filter, n, sort); 60 * @param sort The {@link org.apache.lucene.search.Sort} object 65 Sort sort) throws IOException { 66 return search(createNormalizedWeight(query), null, n, sort); 209 abstract public TopFieldDocs search(Weight weight, Filter filter, int n, Sort sort) throws IOException; argument 51 search(Query query, Filter filter, int n, Sort sort) argument 64 search(Query query, int n, Sort sort) argument
|
H A D | TopDocs.java | 126 public MergeSortQueue(Sort sort, TopDocs[] shardHits) throws IOException { argument 142 throw new IllegalArgumentException("shard " + shardIDX + " did not set sort field values (FieldDoc.fields is null); you must pass fillFields=true to IndexSearcher.search on each shard"); 148 final SortField[] sortFields = sort.getSort(); 198 * the same Sort, and sort field values must have been 203 * <p>Pass sort=null to merge sort by score descending. 206 public static TopDocs merge(Sort sort, int topN, TopDocs[] shardHits) throws IOException { argument 209 if (sort == null) { 212 queue = new MergeSortQueue(sort, shardHits); 256 if (sort [all...] |
/lucene-3.6.0/solr/client/ruby/flare/vendor/plugins/flare/lib/flare/ |
H A D | context.rb | 16 attr_accessor :queries, :filters, :facet_queries, :applied_facet_queries, :page, :sort 77 :fields => @facet_fields, :limit => 20 , :mincount => 1, :sort => :count, 81 :sort => @sort) 106 :mincount => 1, :limit => limit, :prefix => prefix, :missing => true, :sort => :count
|
/lucene-3.6.0/solr/core/src/java/org/apache/solr/tst/ |
H A D | TestRequestHandler.java | 103 // If the first non-query, non-filter command is a simple sort on an indexed field, then 104 // we can use the Lucene sort ability. 105 Sort sort = null; 107 sort = QueryParsing.parseSort(commands.get(1), req); 128 DocList results = req.getSearcher().getDocList(query, null, sort, req.getStart(), req.getLimit(), flags); 186 if (sort != null) { 187 TopFieldDocs hits = searcher.search(query, lfilter, 1000, sort); 218 DocList results2 = req.getSearcher().getDocList(query,query,sort,start,limit); 226 DocListAndSet both = searcher.getDocListAndSet(query,filter,sort,start, limit); 232 DocListAndSet both2 = searcher.getDocListAndSet(query,both.docSet,sort,star [all...] |