Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Fieldable.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef FIELDABLE_H
8#define FIELDABLE_H
9
10#include "LuceneObject.h"
11
12namespace Lucene {
13
20class LPPAPI Fieldable {
21public:
23 virtual ~Fieldable() {}
24
25public:
40 virtual void setBoost(double boost) = 0;
41
49 virtual double getBoost() = 0;
50
52 virtual String name() = 0;
53
63 virtual String stringValue() = 0;
64
67 virtual ReaderPtr readerValue() = 0;
68
72
74 virtual bool isStored() = 0;
75
77 virtual bool isIndexed() = 0;
78
81 virtual bool isTokenized() = 0;
82
87 virtual bool isTermVectorStored() = 0;
88
91 virtual bool isStoreOffsetWithTermVector() = 0;
92
95
97 virtual bool isBinary() = 0;
98
100 virtual bool getOmitNorms() = 0;
101
104 virtual void setOmitNorms(bool omitNorms) = 0;
105
111 virtual bool isLazy() = 0;
112
116 virtual int32_t getBinaryOffset() = 0;
117
121 virtual int32_t getBinaryLength() = 0;
122
126 virtual ByteArray getBinaryValue() = 0;
127
137 virtual ByteArray getBinaryValue(ByteArray result) = 0;
138
140 virtual bool getOmitTermFreqAndPositions() = 0;
141
147 virtual void setOmitTermFreqAndPositions(bool omitTermFreqAndPositions) = 0;
148};
149
150}
151
152#endif
#define LUCENE_INTERFACE(Name)
Definition LuceneObject.h:19
Synonymous with Field.
Definition Fieldable.h:20
virtual bool isTermVectorStored()=0
True if the term or terms used to index this field are stored as a term vector, available from IndexR...
virtual bool isLazy()=0
Indicates whether a Field is Lazy or not. The semantics of Lazy loading are such that if a Field is l...
virtual bool getOmitTermFreqAndPositions()=0
virtual void setOmitNorms(bool omitNorms)=0
If set, omit normalization factors associated with this indexed field. This effectively disables inde...
virtual TokenStreamPtr tokenStreamValue()=0
The TokenStream for this field to be used when indexing, or null.
virtual ReaderPtr readerValue()=0
The value of the field as a Reader, which can be used at index time to generate indexed tokens.
virtual int32_t getBinaryLength()=0
Returns length of byte[] segment that is used as value, if Field is not binary returned value is unde...
virtual bool isIndexed()=0
True if the value of the field is to be indexed, so that it may be searched on.
virtual void setOmitTermFreqAndPositions(bool omitTermFreqAndPositions)=0
If set, omit term freq, positions and payloads from postings for this field.
virtual int32_t getBinaryOffset()=0
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is un...
virtual ByteArray getBinaryValue(ByteArray result)=0
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength and getBinar...
virtual ByteArray getBinaryValue()=0
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength and getBinar...
virtual bool isBinary()=0
True if the value of the field is stored as binary.
virtual bool getOmitNorms()=0
True if norms are omitted for this indexed field.
virtual ~Fieldable()
Definition Fieldable.h:23
virtual double getBoost()=0
Returns the boost factor for hits for this field.
virtual bool isTokenized()=0
True if the value of the field should be tokenized as text prior to indexing. Un-tokenized fields are...
virtual String name()=0
Returns the name of the field as an interned string. For example "date", "title", "body",...
virtual bool isStorePositionWithTermVector()=0
True if terms are stored as term vector together with their token positions.
virtual String stringValue()=0
The value of the field as a String, or empty.
virtual void setBoost(double boost)=0
Sets the boost factor hits on this field. This value will be multiplied into the score of all hits on...
virtual bool isStoreOffsetWithTermVector()=0
True if terms are stored as term vector together with their offsets (start and end position in source...
virtual bool isStored()=0
True if the value of the field is to be stored in the index for return with search hits.
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< TokenStream > TokenStreamPtr
Definition LuceneTypes.h:63
boost::shared_ptr< Reader > ReaderPtr
Definition LuceneTypes.h:547

clucene.sourceforge.net