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

Loading...
Searching...
No Matches
DateField.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 DATEFIELD_H
8#define DATEFIELD_H
9
10#include "LuceneObject.h"
11
12 namespace Lucene {
13
31 class LPPAPI DateField : public LuceneObject {
32 public:
33 virtual ~DateField();
34
35 LUCENE_CLASS(DateField);
36
37 protected:
38 static int32_t DATE_LEN();
39
40 public:
41 static const String& MIN_DATE_STRING();
42 static const String& MAX_DATE_STRING();
43
45 static String dateToString(const boost::posix_time::ptime& date);
46
48 static String timeToString(int64_t time);
49
51 static int64_t stringToTime(const String& s);
52};
53
54}
55
56#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::DateField
Provides support for converting dates to strings and vice-versa. The strings are structured so that l...
Definition DateField.h:31
Lucene::DateField::~DateField
virtual ~DateField()
Lucene::DateField::MIN_DATE_STRING
static const String & MIN_DATE_STRING()
Lucene::DateField::MAX_DATE_STRING
static const String & MAX_DATE_STRING()
Lucene::DateField::timeToString
static String timeToString(int64_t time)
Converts a millisecond time to a string suitable for indexing.
Lucene::DateField::DATE_LEN
static int32_t DATE_LEN()
Lucene::DateField::dateToString
static String dateToString(const boost::posix_time::ptime &date)
Converts a Date to a string suitable for indexing.
Lucene::DateField::stringToTime
static int64_t stringToTime(const String &s)
Converts a string-encoded date into a millisecond time.
Lucene::LuceneObject
Base class for all Lucene classes.
Definition LuceneObject.h:31
Lucene
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net