Class SearchAsYouTypePropertyDescriptor<T>
A text-like field that is optimized to provide out-of-the-box support for the "search as you type" completion use case.
It creates a series of subfields that are analyzed to index terms that can be efficiently matched by a query that
partially matches the entire indexed text value. Both prefix completion (i.e matching terms starting at the beginning of the input)
and infix completion (i.e. matching terms at any position within the input) are supported.
Inheritance
SearchAsYouTypePropertyDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class SearchAsYouTypePropertyDescriptor<T> : CorePropertyDescriptorBase<SearchAsYouTypePropertyDescriptor<T>, ISearchAsYouTypeProperty, T>, IDescriptor, ISearchAsYouTypeProperty, ICoreProperty, IProperty, IFieldMapping where T : class
Type Parameters
Constructors
|
Edit this page
View Source
SearchAsYouTypePropertyDescriptor()
Declaration
public SearchAsYouTypePropertyDescriptor()
Methods
|
Edit this page
View Source
Analyzer(string)
The analyzer which should be used for analyzed string fields, both at index-time and at
search-time (unless overridden by the search_analyzer).
Defaults to the default index analyzer, or the standard analyzer.
Declaration
public SearchAsYouTypePropertyDescriptor<T> Analyzer(string analyzer)
Parameters
Type |
Name |
Description |
string |
analyzer |
|
Returns
|
Edit this page
View Source
Index(bool?)
Should the field be searchable? Accepts true
(default) or false
.
Declaration
public SearchAsYouTypePropertyDescriptor<T> Index(bool? index = true)
Parameters
Type |
Name |
Description |
bool? |
index |
|
Returns
|
Edit this page
View Source
IndexOptions(IndexOptions?)
What information should be stored in the index, for search and highlighting purposes. Defaults to Positions.
Declaration
public SearchAsYouTypePropertyDescriptor<T> IndexOptions(IndexOptions? indexOptions)
Parameters
Returns
|
Edit this page
View Source
MaxShingleSize(int?)
The largest shingle size to index the input with and create subfields for.
Declaration
public SearchAsYouTypePropertyDescriptor<T> MaxShingleSize(int? maxShingleSize)
Parameters
Type |
Name |
Description |
int? |
maxShingleSize |
|
Returns
|
Edit this page
View Source
Norms(bool?)
Whether field-length should be taken into account when scoring queries. Accepts true or false. This option configures the root field
and shingle subfields, where its default is true.
It does not configure the prefix subfield, where it it false.
Declaration
public SearchAsYouTypePropertyDescriptor<T> Norms(bool? enabled = true)
Parameters
Type |
Name |
Description |
bool? |
enabled |
|
Returns
|
Edit this page
View Source
SearchAnalyzer(string)
The analyzer that should be used at search time on analyzed fields. Defaults to the analyzer setting.
Declaration
public SearchAsYouTypePropertyDescriptor<T> SearchAnalyzer(string searchAnalyzer)
Parameters
Type |
Name |
Description |
string |
searchAnalyzer |
|
Returns
|
Edit this page
View Source
SearchQuoteAnalyzer(string)
The analyzer that should be used at search time when a phrase is encountered. Defaults to the search_analyzer setting.
Declaration
public SearchAsYouTypePropertyDescriptor<T> SearchQuoteAnalyzer(string searchQuoteAnalyzer)
Parameters
Type |
Name |
Description |
string |
searchQuoteAnalyzer |
|
Returns
|
Edit this page
View Source
TermVector(TermVectorOption?)
Whether term vectors should be stored for an analyzed field. Defaults to no. This option
configures the root field and shingle subfields, but not the prefix subfield.
Declaration
public SearchAsYouTypePropertyDescriptor<T> TermVector(TermVectorOption? termVector)
Parameters
Returns
Implements
Extension Methods