1// Copyright (c) 2014 Couchbase, Inc. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package bleve 16 17import "github.com/blevesearch/bleve/mapping" 18 19// NewIndexMapping creates a new IndexMapping that will use all the default indexing rules 20func NewIndexMapping() *mapping.IndexMappingImpl { 21 return mapping.NewIndexMapping() 22} 23 24// NewDocumentMapping returns a new document mapping 25// with all the default values. 26func NewDocumentMapping() *mapping.DocumentMapping { 27 return mapping.NewDocumentMapping() 28} 29 30// NewDocumentStaticMapping returns a new document 31// mapping that will not automatically index parts 32// of a document without an explicit mapping. 33func NewDocumentStaticMapping() *mapping.DocumentMapping { 34 return mapping.NewDocumentStaticMapping() 35} 36 37// NewDocumentDisabledMapping returns a new document 38// mapping that will not perform any indexing. 39func NewDocumentDisabledMapping() *mapping.DocumentMapping { 40 return mapping.NewDocumentDisabledMapping() 41} 42 43// NewTextFieldMapping returns a default field mapping for text 44func NewTextFieldMapping() *mapping.FieldMapping { 45 return mapping.NewTextFieldMapping() 46} 47 48// NewNumericFieldMapping returns a default field mapping for numbers 49func NewNumericFieldMapping() *mapping.FieldMapping { 50 return mapping.NewNumericFieldMapping() 51} 52 53// NewDateTimeFieldMapping returns a default field mapping for dates 54func NewDateTimeFieldMapping() *mapping.FieldMapping { 55 return mapping.NewDateTimeFieldMapping() 56} 57 58// NewBooleanFieldMapping returns a default field mapping for booleans 59func NewBooleanFieldMapping() *mapping.FieldMapping { 60 return mapping.NewBooleanFieldMapping() 61} 62 63func NewGeoPointFieldMapping() *mapping.FieldMapping { 64 return mapping.NewGeoPointFieldMapping() 65} 66