updated doc for date queries
This commit is contained in:
parent
07a94aced1
commit
261388246e
@ -1011,6 +1011,44 @@ fvwm
|
||||
cases to set up separate databases instead.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para><literal>date</literal> for searching or filtering
|
||||
on dates. The syntax for the argument is based on the ISO8601
|
||||
standard for dates and time intervals. Only dates are supported, no
|
||||
times. The general syntax is 2 elements separated by a
|
||||
<literal>/</literal> character. Each element can be a date or a
|
||||
period of time. Periods are specified as
|
||||
<literal>P</literal><replaceable>n</replaceable><literal>Y</literal><replaceable>n</replaceable><literal>M</literal><replaceable>n</replaceable><literal>D</literal>.
|
||||
The <replaceable>n</replaceable> numbers are the respective numbers
|
||||
of years, months or days, any of which may be missing. Dates are
|
||||
specified as
|
||||
<replaceable>YYYY</replaceable>-<replaceable>MM</replaceable>-<replaceable>DD</replaceable>.
|
||||
The days and months parts may be missing. If the
|
||||
<literal>/</literal> is present but an element is missing, the
|
||||
missing element is interpreted as the lowest or highest date in the
|
||||
index. Exemples:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>2001-03-01/2002-05-01</literal> the
|
||||
basic syntax for an interval of dates.</para>
|
||||
</listitem>
|
||||
<listitem><para><literal>2001-03-01/P1Y2M</literal> the
|
||||
same specified with a period.</para>
|
||||
</listitem>
|
||||
<listitem><para><literal>2001/</literal> from the beginning of
|
||||
2001 to the latest date in the index.</para>
|
||||
</listitem>
|
||||
<listitem><para><literal>2001</literal> the whole year of
|
||||
2001</para></listitem>
|
||||
<listitem><para><literal>P2D/</literal> means 2 days ago up to
|
||||
now if there are no documents with dates in the future.</para>
|
||||
</listitem>
|
||||
<listitem><para><literal>/2003</literal> all documents from
|
||||
2003 or older.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>Periods can also be specified with small letters (ie:
|
||||
p2y).</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para><literal>mime</literal> or
|
||||
<literal>format</literal> for specifying the
|
||||
mime type. This one is quite special because you can specify
|
||||
|
||||
@ -94,7 +94,8 @@ void SSearch::searchTypeChanged(int typ)
|
||||
"<i>field:term1</i> : 'term1' in field 'field'.<br>\n"
|
||||
" Standard field names/synonyms:<br>\n"
|
||||
" title/subject/caption, author/from, recipient/to, filename, ext.<br>\n"
|
||||
" Pseudo-fields: dir, mime/format, type/rclcat.<br>\n"
|
||||
" Pseudo-fields: dir, mime/format, type/rclcat, date.<br>\n"
|
||||
" Two date interval exemples: 2009-03-01/2009-05-20 2009-03-01/P2M.<br>\n"
|
||||
"<i>term1 term2 OR term3</i> : term1 AND (term2 OR term3).<br>\n"
|
||||
" No actual parentheses allowed.<br>\n"
|
||||
"<i>\"term1 term2\"</i> : phrase (must occur exactly). Possible modifiers:<br>\n"
|
||||
|
||||
@ -1036,7 +1036,7 @@ int main(int argc, char **argv)
|
||||
cerr << "[" << *it << "] ";
|
||||
cerr << endl;
|
||||
exit(0);
|
||||
#elif 0
|
||||
#elif 1
|
||||
if (argc <=0 ) {
|
||||
cerr << "Usage: smallut <dateinterval>" << endl;
|
||||
exit(1);
|
||||
@ -1049,7 +1049,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
cerrdip("", &di);
|
||||
exit(0);
|
||||
#elif 1
|
||||
#elif 0
|
||||
DateInterval di;
|
||||
for (int i = 0; i < nperiods; i++) {
|
||||
if (!parsedateinterval(periods[i], &di)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user