You can certainly use a filter and MatchAllDocs. You can also index a special value for the field in question (nothere) and combine MatchAllDocs with a NOT field:nothere or some such.
Best Erick On Wed, Jul 2, 2008 at 5:25 PM, Patrick <[EMAIL PROTECTED]> wrote: > Hi, > > Can't seem to wrap my head around how to go about it. > > I want to retrieve all documents where a certain field in not empty. > > What would be the best way to do it? > > Should I search with a MatchAllDocQuery and a Filter? > > Should I go through all terms in the field and create a TermQuery with it? > > Many thanks. > > Patrick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >