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

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
Lucene::FieldDoc Class Reference

A ScoreDoc which also contains information about how to sort the referenced document. In addition to the document number and score, this object contains an array of values for the document from the field(s) used to sort. For example, if the sort criteria was to sort by fields "a", "b" then "c", the fields object array will have three elements, corresponding respectively to the term values for the document in fields "a", "b" and "c". The class of each element in the array will be either Integer, Double or String depending on the type of values in the terms of each field. More...

`#include <FieldDoc.h>`

Inheritance diagram for Lucene::FieldDoc:

## Public Member Functions

| FieldDoc (int32_t doc, double score, Collection< ComparableValue > fields=Collection< ComparableValue >())
virtual | ~FieldDoc ()
virtual String | getClassName ()
boost::shared_ptr< FieldDoc > | shared_from_this ()
virtual String | toString ()
| Returns a string representation of the object.
Public Member Functions inherited from Lucene::ScoreDoc
| ScoreDoc (int32_t doc, double score)
virtual | ~ScoreDoc ()
boost::shared_ptr< ScoreDoc > | shared_from_this ()
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed.
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())
| Return clone of this object.
virtual int32_t | hashCode ()
| Return hash code for this object.
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal.
virtual int32_t | compareTo (const LuceneObjectPtr &other)
| Compare two objects.
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock.
virtual LuceneSignalPtr | getSignal ()
| Return this object signal.
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout.
virtual void | unlock ()
| Unlock this object.
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread.
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout.
virtual void | notifyAll ()
| Notify all threads waiting for signal.

## Static Public Member Functions

static String | _getClassName ()
Static Public Member Functions inherited from Lucene::ScoreDoc
static String | _getClassName ()

## Data Fields

Collection< ComparableValue > | fields
| The values which are used to sort the referenced document. The order of these will match the original sort criteria given by a Sort object. Each Object will be either an Integer, Double or String, depending on the type of values in the terms of the original field.
Data Fields inherited from Lucene::ScoreDoc
double | score
| The score of this document for the query.
int32_t | doc
| A hit document's number.

## Additional Inherited Members

Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

A ScoreDoc which also contains information about how to sort the referenced document. In addition to the document number and score, this object contains an array of values for the document from the field(s) used to sort. For example, if the sort criteria was to sort by fields "a", "b" then "c", the fields object array will have three elements, corresponding respectively to the term values for the document in fields "a", "b" and "c". The class of each element in the array will be either Integer, Double or String depending on the type of values in the terms of each field.

## Constructor & Destructor Documentation

## ◆ FieldDoc()

Lucene::FieldDoc::FieldDoc | ( | int32_t | doc,
|  | double | score,
|  | Collection< ComparableValue > | fields = Collection< ComparableValue >() )

References Lucene::ScoreDoc::doc, fields, and Lucene::ScoreDoc::score.

Referenced by _getClassName().

## ◆ ~FieldDoc()

virtual Lucene::FieldDoc::~FieldDoc | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

String Lucene::FieldDoc::_getClassName | ( |  | ) |

inline static

References FieldDoc().

## ◆ getClassName()

virtual String Lucene::FieldDoc::getClassName | ( |  | ) |

inline virtual

Reimplemented from Lucene::ScoreDoc.

## ◆ shared_from_this()

boost::shared_ptr< FieldDoc > Lucene::FieldDoc::shared_from_this | ( |  | ) |

inline

## ◆ toString()

virtual String Lucene::FieldDoc::toString | ( |  | ) |

virtual

Returns a string representation of the object.

Reimplemented from Lucene::ScoreDoc.

## Field Documentation

## ◆ fields

Collection<ComparableValue> Lucene::FieldDoc::fields

The values which are used to sort the referenced document. The order of these will match the original sort criteria given by a Sort object. Each Object will be either an Integer, Double or String, depending on the type of values in the terms of the original field.

See also
  Sort
  Searcher#search(QueryPtr, FilterPtr, int32_t, SortPtr)

Referenced by FieldDoc().

The documentation for this class was generated from the following file:

- FieldDoc.h

clucene.sourceforge.net