org.elasticsearch.search.sort
Class SortBuilders

java.lang.Object
  extended by org.elasticsearch.search.sort.SortBuilders

public class SortBuilders
extends Object

A set of static factory methods for SortBuilders.


Constructor Summary
SortBuilders()
           
 
Method Summary
static FieldSortBuilder fieldSort(String field)
          Constructs a new field based sort.
static GeoDistanceSortBuilder geoDistanceSort(String fieldName)
          A geo distance based sort.
static ScoreSortBuilder scoreSort()
          Constructs a new score sort.
static ScriptSortBuilder scriptSort(String script, String type)
          Constructs a new script based sort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortBuilders

public SortBuilders()
Method Detail

scoreSort

public static ScoreSortBuilder scoreSort()
Constructs a new score sort.


fieldSort

public static FieldSortBuilder fieldSort(String field)
Constructs a new field based sort.

Parameters:
field - The field name.

scriptSort

public static ScriptSortBuilder scriptSort(String script,
                                           String type)
Constructs a new script based sort.

Parameters:
script - The script to use.
type - The type, can either be "string" or "number".

geoDistanceSort

public static GeoDistanceSortBuilder geoDistanceSort(String fieldName)
A geo distance based sort.

Parameters:
fieldName - The geo point like field name.


Copyright © 2009-2012. All Rights Reserved.