public class Schema extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Schema.Field |
static class |
Schema.FieldType |
static class |
Schema.TextField
FullText field spec.
|
Modifier and Type | Field and Description |
---|---|
List<Schema.Field> |
fields |
Constructor and Description |
---|
Schema() |
Modifier and Type | Method and Description |
---|---|
Schema |
addField(Schema.Field field) |
Schema |
addGeoField(String name)
Add a geo filtering field to the schema.
|
Schema |
addNumericField(String name)
Add a numeric field to the schema
|
Schema |
addSortableNumericField(String name) |
Schema |
addSortableTextField(String name,
double weight)
Add a text field that can be sorted on
|
Schema |
addTagField(String name) |
Schema |
addTagField(String name,
String separator) |
Schema |
addTextField(String name,
double weight)
Add a text field to the schema with a given weight
|
public List<Schema.Field> fields
public Schema addTextField(String name, double weight)
name
- the field's nameweight
- its weight, a positive floating point numberpublic Schema addSortableTextField(String name, double weight)
name
- the field's nameweight
- its weight, a positive floating point numberpublic Schema addGeoField(String name)
name
- the field's namepublic Schema addNumericField(String name)
name
- the fields's nam epublic Schema addField(Schema.Field field)
Copyright © 2018. All rights reserved.