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
12namespace Lucene {
13
31class LPPAPI DateField : public LuceneObject {
32public:
33 virtual ~DateField();
34
36
37protected:
38 static int32_t DATE_LEN();
39
40public:
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
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Provides support for converting dates to strings and vice-versa. The strings are structured so that l...
Definition DateField.h:31
virtual ~DateField()
static const String & MIN_DATE_STRING()
static const String & MAX_DATE_STRING()
static String timeToString(int64_t time)
Converts a millisecond time to a string suitable for indexing.
static int32_t DATE_LEN()
static String dateToString(const boost::posix_time::ptime &date)
Converts a Date to a string suitable for indexing.
static int64_t stringToTime(const String &s)
Converts a string-encoded date into a millisecond time.
Base class for all Lucene classes.
Definition LuceneObject.h:31
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net