2014-04-17 22:55:53 +02:00
|
|
|
// Copyright (c) 2014 Couchbase, Inc.
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
// except in compliance with the License. You may obtain a copy of the License at
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
// Unless required by applicable law or agreed to in writing, software distributed under the
|
|
|
|
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
|
|
// either express or implied. See the License for the specific language governing permissions
|
|
|
|
// and limitations under the License.
|
2014-09-02 16:54:50 +02:00
|
|
|
|
2014-04-17 22:55:53 +02:00
|
|
|
package document
|
|
|
|
|
|
|
|
import (
|
2014-08-28 21:38:57 +02:00
|
|
|
"github.com/blevesearch/bleve/analysis"
|
2014-04-17 22:55:53 +02:00
|
|
|
)
|
|
|
|
|
2014-07-14 20:47:05 +02:00
|
|
|
type Field interface {
|
2015-10-09 10:54:40 +02:00
|
|
|
// Name returns the path of the field from the root DocumentMapping.
|
|
|
|
// A root field path is "field", a subdocument field is "parent.field".
|
2014-07-14 20:47:05 +02:00
|
|
|
Name() string
|
2015-10-09 10:54:40 +02:00
|
|
|
// ArrayPositions returns the intermediate document and field indices
|
|
|
|
// required to resolve the field value in the document. For example, if the
|
|
|
|
// field path is "doc1.doc2.field" where doc1 and doc2 are slices or
|
|
|
|
// arrays, ArrayPositions returns 2 indices used to resolve "doc2" value in
|
|
|
|
// "doc1", then "field" in "doc2".
|
2014-08-19 14:58:26 +02:00
|
|
|
ArrayPositions() []uint64
|
2014-07-14 20:47:05 +02:00
|
|
|
Options() IndexingOptions
|
2014-07-21 23:05:55 +02:00
|
|
|
Analyze() (int, analysis.TokenFrequencies)
|
2014-07-14 20:47:05 +02:00
|
|
|
Value() []byte
|
2014-04-17 22:55:53 +02:00
|
|
|
}
|