C# Class Rubber.DSL.SearchBuilder

A search source builder allowing to easily build search source. Simple construction using {@link org.elasticsearch.search.builder.SearchSourceBuilder#searchSource()}.
Inheritance: IJsonSerializable
Afficher le fichier Open project: stephenpope/Rubber Class Usage Examples

Méthodes publiques

Méthode Description
Builder ( ) : SearchBuilder

A static factory method to construct a new search builder.

Explain ( bool explain ) : SearchBuilder

Should each {@link org.elasticsearch.search.SearchHit} be returned with an explanation of the hit (ranking).

Facet ( AbstractFacetBuilder facet ) : SearchBuilder

Add a facet to perform as part of the search.

Facets ( byte facetsBinary ) : SearchBuilder

Sets raw (json) facets.

Facets ( byte facetsBinary, int facetBinaryOffset, int facetBinaryLength ) : SearchBuilder

Sets raw (json) facets.

Field ( string field ) : SearchBuilder

Adds a field to load and return (note, it must be stored) as part of the search request. If none are specified, the source of the document will be return.

Fields ( ) : SearchBuilder

Sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.

Fields ( List fields ) : SearchBuilder

Sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.

Filter ( IFilterBuilder filter ) : SearchBuilder
Filter ( byte filter ) : SearchBuilder

Sets a filter on the query executed that only applies to the search query (and not facets for example).

Filter ( byte filterBinary, int filterBinaryOffset, int filterBinaryLength ) : SearchBuilder

Sets a filter on the query executed that only applies to the search query (and not facets for example).

Filter ( string filterString ) : SearchBuilder

Sets a filter on the query executed that only applies to the search query (and not facets for example).

From ( int from ) : SearchBuilder

From index to start the search from. Defaults to 0.

Highlight ( ) : HighlightBuilder

A static factory method to construct new search highlights.

Highlight ( HighlightBuilder highlight ) : SearchBuilder

Adds highlight to perform as part of the search.

Highlighter ( ) : HighlightBuilder

IndexBoost ( string index, float indexBoost ) : SearchBuilder

Sets the boost a specific index will receive when the query is executeed against it.

MinScore ( float minScore ) : SearchBuilder

Sets the minimum score below which docs will be filtered out.

NoFields ( ) : SearchBuilder

Sets no fields to be loaded, resulting in only id and type to be returned per field.

Query ( IQueryBuilder query ) : SearchBuilder

Constructs a new search source builder with a search query.

Query ( byte queryBinary ) : SearchBuilder

Constructs a new search source builder with a raw search query.

Query ( byte queryBinary, int queryBinaryOffset, int queryBinaryLength ) : SearchBuilder

Constructs a new search source builder with a raw search query.

Query ( string queryString ) : SearchBuilder

Constructs a new search source builder with a raw search query.

ScriptField ( string name, string script ) : SearchBuilder

Adds a script field under the given name with the provided script.

ScriptField ( string name, string script, object>.Dictionary @params ) : SearchBuilder

Adds a script field.

ScriptField ( string name, string lang, string script, object>.Dictionary @params ) : SearchBuilder

Adds a script field.

SearchSource ( ) : SearchBuilder

A static factory method to construct a new search source.

Size ( int size ) : SearchBuilder

The number of search hits to return. Defaults to 10.

Sort ( ISortBuilder sort ) : SearchBuilder

Adds a sort builder.

Sort ( string name ) : SearchBuilder

Add a sort against the given field name.

Sort ( string name, SortOrder order ) : SearchBuilder

Adds a sort against the given field name and the sort ordering.

Stats ( ) : SearchBuilder

The stats groups this request will be aggregated under.

ToJsonObject ( ) : object
ToString ( ) : string
TrackScores ( bool trackScores ) : SearchBuilder

Applies when sorting, and controls if scores will be tracked as well. Defaults to false.

Version ( bool version ) : SearchBuilder

Should each {@link org.elasticsearch.search.SearchHit} be returned with a version associated with it.

Method Details

Builder() public static méthode

A static factory method to construct a new search builder.
public static Builder ( ) : SearchBuilder
Résultat SearchBuilder

Explain() public méthode

Should each {@link org.elasticsearch.search.SearchHit} be returned with an explanation of the hit (ranking).
public Explain ( bool explain ) : SearchBuilder
explain bool
Résultat SearchBuilder

Facet() public méthode

Add a facet to perform as part of the search.
public Facet ( AbstractFacetBuilder facet ) : SearchBuilder
facet Rubber.DSL.Facet.AbstractFacetBuilder
Résultat SearchBuilder

Facets() public méthode

Sets raw (json) facets.
public Facets ( byte facetsBinary ) : SearchBuilder
facetsBinary byte
Résultat SearchBuilder

Facets() public méthode

Sets raw (json) facets.
public Facets ( byte facetsBinary, int facetBinaryOffset, int facetBinaryLength ) : SearchBuilder
facetsBinary byte
facetBinaryOffset int
facetBinaryLength int
Résultat SearchBuilder

Field() public méthode

Adds a field to load and return (note, it must be stored) as part of the search request. If none are specified, the source of the document will be return.
public Field ( string field ) : SearchBuilder
field string
Résultat SearchBuilder

Fields() public méthode

Sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
public Fields ( ) : SearchBuilder
Résultat SearchBuilder

Fields() public méthode

Sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
public Fields ( List fields ) : SearchBuilder
fields List
Résultat SearchBuilder

Filter() public méthode

public Filter ( IFilterBuilder filter ) : SearchBuilder
filter IFilterBuilder
Résultat SearchBuilder

Filter() public méthode

Sets a filter on the query executed that only applies to the search query (and not facets for example).
public Filter ( byte filter ) : SearchBuilder
filter byte
Résultat SearchBuilder

Filter() public méthode

Sets a filter on the query executed that only applies to the search query (and not facets for example).
public Filter ( byte filterBinary, int filterBinaryOffset, int filterBinaryLength ) : SearchBuilder
filterBinary byte
filterBinaryOffset int
filterBinaryLength int
Résultat SearchBuilder

Filter() public méthode

Sets a filter on the query executed that only applies to the search query (and not facets for example).
public Filter ( string filterString ) : SearchBuilder
filterString string
Résultat SearchBuilder

From() public méthode

From index to start the search from. Defaults to 0.
public From ( int from ) : SearchBuilder
from int
Résultat SearchBuilder

Highlight() public static méthode

A static factory method to construct new search highlights.
public static Highlight ( ) : HighlightBuilder
Résultat HighlightBuilder

Highlight() public méthode

Adds highlight to perform as part of the search.
public Highlight ( HighlightBuilder highlight ) : SearchBuilder
highlight HighlightBuilder
Résultat SearchBuilder

Highlighter() public méthode

public Highlighter ( ) : HighlightBuilder
Résultat HighlightBuilder

IndexBoost() public méthode

Sets the boost a specific index will receive when the query is executeed against it.
public IndexBoost ( string index, float indexBoost ) : SearchBuilder
index string The index to apply the boost against
indexBoost float The boost to apply to the index
Résultat SearchBuilder

MinScore() public méthode

Sets the minimum score below which docs will be filtered out.
public MinScore ( float minScore ) : SearchBuilder
minScore float
Résultat SearchBuilder

NoFields() public méthode

Sets no fields to be loaded, resulting in only id and type to be returned per field.
public NoFields ( ) : SearchBuilder
Résultat SearchBuilder

Query() public méthode

Constructs a new search source builder with a search query.
public Query ( IQueryBuilder query ) : SearchBuilder
query IQueryBuilder
Résultat SearchBuilder

Query() public méthode

Constructs a new search source builder with a raw search query.
public Query ( byte queryBinary ) : SearchBuilder
queryBinary byte
Résultat SearchBuilder

Query() public méthode

Constructs a new search source builder with a raw search query.
public Query ( byte queryBinary, int queryBinaryOffset, int queryBinaryLength ) : SearchBuilder
queryBinary byte
queryBinaryOffset int
queryBinaryLength int
Résultat SearchBuilder

Query() public méthode

Constructs a new search source builder with a raw search query.
public Query ( string queryString ) : SearchBuilder
queryString string
Résultat SearchBuilder

ScriptField() public méthode

Adds a script field under the given name with the provided script.
public ScriptField ( string name, string script ) : SearchBuilder
name string The name of the field
script string The script
Résultat SearchBuilder

ScriptField() public méthode

Adds a script field.
public ScriptField ( string name, string script, object>.Dictionary @params ) : SearchBuilder
name string The name of the field
script string The script to execute
@params object>.Dictionary
Résultat SearchBuilder

ScriptField() public méthode

Adds a script field.
public ScriptField ( string name, string lang, string script, object>.Dictionary @params ) : SearchBuilder
name string The name of the field
lang string The language of the script
script string The script to execute
@params object>.Dictionary
Résultat SearchBuilder

SearchSource() public static méthode

A static factory method to construct a new search source.
public static SearchSource ( ) : SearchBuilder
Résultat SearchBuilder

Size() public méthode

The number of search hits to return. Defaults to 10.
public Size ( int size ) : SearchBuilder
size int
Résultat SearchBuilder

Sort() public méthode

Adds a sort builder.
public Sort ( ISortBuilder sort ) : SearchBuilder
sort ISortBuilder
Résultat SearchBuilder

Sort() public méthode

Add a sort against the given field name.
public Sort ( string name ) : SearchBuilder
name string
Résultat SearchBuilder

Sort() public méthode

Adds a sort against the given field name and the sort ordering.
public Sort ( string name, SortOrder order ) : SearchBuilder
name string The name of the field
order SortOrder The sort ordering
Résultat SearchBuilder

Stats() public méthode

The stats groups this request will be aggregated under.
public Stats ( ) : SearchBuilder
Résultat SearchBuilder

ToJsonObject() public méthode

public ToJsonObject ( ) : object
Résultat object

ToString() public méthode

public ToString ( ) : string
Résultat string

TrackScores() public méthode

Applies when sorting, and controls if scores will be tracked as well. Defaults to false.
public TrackScores ( bool trackScores ) : SearchBuilder
trackScores bool
Résultat SearchBuilder

Version() public méthode

Should each {@link org.elasticsearch.search.SearchHit} be returned with a version associated with it.
public Version ( bool version ) : SearchBuilder
version bool
Résultat SearchBuilder