Is it possible to do something like the following in lucene? If not, can you give any suggestions for how to get around this limitation?
SELECT
start.dt AS eventstarttime,
last.dt AS eventfinishtime
WHERE
start.evt:"Started" AND last.evt:"Ended" AND start.evtgrpid = last.evtgrpid
Your question does not give enough information to fully answer it. This SQL is not even valid - where is the
FROM
clause (for a start)?Suggestion 1: run two queries ("Started" and "Ended") separately and merge the results based on
evtgrpid
.Suggestion 2: run one query (e.g. "Started") and filter the results based on "Ended" criteria.
Suggestion 3: do not use Lucene for what databases are built for. Really. Often database logic does not even apply to Lucene (e.g. what if stopwords are used when indexing?).