Please can somebody provide a clear working example showing the correct way
to query a Lucene indexed date column. I have recently downloaded version
2.1.0 and am experiencing a few problems searching by date using a LUCENE
FULLTEXT index.
Here is a class definition:
CREATE CLASS Book
CREATE PROPERTY Book.title STRING
CREATE PROPERTY Book.language STRING
CREATE PROPERTY Book.author STRING
CREATE PROPERTY Book.genre STRING
CREATE PROPERTY Book.description STRING
CREATE PROPERTY Book.viewed INTEGER
CREATE PROPERTY Book.bought INTEGER
CREATE PROPERTY Book.instock INTEGER
CREATE PROPERTY Book.created DATETIME
Here is an index definition:
CREATE INDEX ibook ON Book (title, language, author, genre, description,
created) FULLTEXT ENGINE LUCENE METADATA
{"analyzer":"org.apache.lucene.analysis.en.EnglishAnalyzer"};
Some data:
INSERT INTO Book (title, language, author, genre, description, viewed,
bought, instock, created) VALUES ('Kitchens of the Great Midwest', 'EN',
'J. Ryan Stradal', 'Fiction', 'Joyful, quirky and heartwarming, this is the
story of a girl who becomes a world-famous chef, told by those who love
her, envy her and never forget her.', 50, 10, 100, '2015-04-17
00:00:00.000'), ('The Art of Thinking Clearly: Better Thinking, Better
Decisions', 'EN', 'Rolf Dobelli', 'Business', 'Already a huge bestseller in
Europe, this is essential reading for anyone with important decisions to
make, in the vein of THINKING, FAST AND SLOW and THE DECISION BOOK.', 450,
100, 400, '2015-05-02 00:00:00.000')
Here are a few examples that I have tried without any success:
SELECT FROM Book WHERE [title, language, author, genre, description,
created] LUCENE "((title:midwest*) AND (author:stradal*) AND
created:[20150101 TO 20150901])"
SELECT FROM Book WHERE [title, language, author, genre, description,
created] LUCENE "((title:midwest*) AND (author:stradal*) AND
created:[2015-01-01 TO 2015-09-01])"
SELECT FROM Book WHERE [title, language, author, genre, description,
created] LUCENE "((title:midwest*) AND (author:stradal*) AND
created:[2015-01-01T00:00:00.000 TO 2015-09-01T00:00:00.000])"
Many thanks.
Mark
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.