Question: I'd like to implement a filter/search feature in my application using Lucene. 

Querying Lucene index gives me a `Hits` instance, which is nothing more than a list of `Document`s matching my criteria. 

Since I generate the indexed `Document`s from my objects, which is the best way to find the original object related to a specific Lucene `Document`?

---

A better description of my situation: 

* Three model classes for now: `Folder` (can have other `Folder`s or
`List`s as children), `List` (can have `Task`s as children) and
`Task` (can have other `Task`s as children). They are all
`DefaultMutableTreeNode` subclasses. I'll add the `Tag` entity in the
future.
* Each `Task` has a text, a start date, a due date, some boolean flags.
* They are displayed in a `JTree`.
* The hole tree is saved in an XML file.
* I'd like to do things like these:
* search `Task`s with Google-like queries.
* Find all `Task`s that start today.
* Filter `Task`s by `Tag`.

Answer: 
I don't believe this is handled directly for you. What you could do is parse the date yourself, as three separate integers:

* Parse the 2009, and construct a DateTime of 1st January 2009
* Parse the 09 and subtract one, then call `dt = dt.AddMonths(8)` to get September 1st
* Parse the 31 and subtract one, then call `dt.AddDays(30)`

This will handle things like 2009/13/01 to mean 1st January 2010. It won't do what you want with February 31st though, I suspect...
I think the `DateTime.DaysInMonth` method can help a lot, after a `TryParse` ... you can implement the logic you are talking about