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
12 namespace Lucene {
13
20 class LPPAPI Fieldable {
21 public:
22 LUCENE_INTERFACE(Fieldable);
23 virtual ~Fieldable() {}
24
25 public:
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
71 virtual TokenStreamPtr tokenStreamValue() = 0;
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
94 virtual bool isStorePositionWithTermVector() = 0;
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
LuceneObject.h
LUCENE_INTERFACE
#define LUCENE_INTERFACE(Name)
Definition LuceneObject.h:19
Lucene::Fieldable
Synonymous with Field.
Definition Fieldable.h:20
Lucene::Fieldable::isTermVectorStored
virtual bool isTermVectorStored()=0
True if the term or terms used to index this field are stored as a term vector, available from IndexR...
Lucene::Fieldable::isLazy
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...
Lucene::Fieldable::getOmitTermFreqAndPositions
virtual bool getOmitTermFreqAndPositions()=0
Lucene::Fieldable::setOmitNorms
virtual void setOmitNorms(bool omitNorms)=0
If set, omit normalization factors associated with this indexed field. This effectively disables inde...
Lucene::Fieldable::tokenStreamValue
virtual TokenStreamPtr tokenStreamValue()=0
The TokenStream for this field to be used when indexing, or null.
Lucene::Fieldable::readerValue
virtual ReaderPtr readerValue()=0
The value of the field as a Reader, which can be used at index time to generate indexed tokens.
Lucene::Fieldable::getBinaryLength
virtual int32_t getBinaryLength()=0
Returns length of byte[] segment that is used as value, if Field is not binary returned value is unde...
Lucene::Fieldable::isIndexed
virtual bool isIndexed()=0
True if the value of the field is to be indexed, so that it may be searched on.
Lucene::Fieldable::setOmitTermFreqAndPositions
virtual void setOmitTermFreqAndPositions(bool omitTermFreqAndPositions)=0
If set, omit term freq, positions and payloads from postings for this field.
Lucene::Fieldable::getBinaryOffset
virtual int32_t getBinaryOffset()=0
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is un...
Lucene::Fieldable::getBinaryValue
virtual ByteArray getBinaryValue(ByteArray result)=0
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength and getBinar...
Lucene::Fieldable::getBinaryValue
virtual ByteArray getBinaryValue()=0
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength and getBinar...
Lucene::Fieldable::isBinary
virtual bool isBinary()=0
True if the value of the field is stored as binary.
Lucene::Fieldable::getOmitNorms
virtual bool getOmitNorms()=0
True if norms are omitted for this indexed field.
Lucene::Fieldable::~Fieldable
virtual ~Fieldable()
Definition Fieldable.h:23
Lucene::Fieldable::getBoost
virtual double getBoost()=0
Returns the boost factor for hits for this field.
Lucene::Fieldable::isTokenized
virtual bool isTokenized()=0
True if the value of the field should be tokenized as text prior to indexing. Un-tokenized fields are...
Lucene::Fieldable::name
virtual String name()=0
Returns the name of the field as an interned string. For example "date", "title", "body",...
Lucene::Fieldable::isStorePositionWithTermVector
virtual bool isStorePositionWithTermVector()=0
True if terms are stored as term vector together with their token positions.
Lucene::Fieldable::stringValue
virtual String stringValue()=0
The value of the field as a String, or empty.
Lucene::Fieldable::setBoost
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...
Lucene::Fieldable::isStoreOffsetWithTermVector
virtual bool isStoreOffsetWithTermVector()=0
True if terms are stored as term vector together with their offsets (start and end position in source...
Lucene::Fieldable::isStored
virtual bool isStored()=0
True if the value of the field is to be stored in the index for return with search hits.
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::TokenStreamPtr
boost::shared_ptr< TokenStream > TokenStreamPtr
Definition LuceneTypes.h:63
Lucene::ReaderPtr
boost::shared_ptr< Reader > ReaderPtr
Definition LuceneTypes.h:547

clucene.sourceforge.net