lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattspitz <>
Subject Searching documents that contain a field (text of field is irrelevant)
Date Tue, 02 Jun 2009 04:20:51 GMT


Consider a bunch of documents that represent, say, students.  These students
have the following attributes:
1) Student IDs
2) Name
3) Self-description (optional)

So, all documents have id: and name:, but only some of the documents have an
added desc:

Assuming all of the fields are indexed, I can certainly search within any of
the fields.  That is: "+name:John desc:muffins" searches for students named
John who mentioned "muffins" in their description.

What I want is all documents that contain the self-description field,
regardless of what that field contains.  

I can probably do this: "desc:*", but I'm not sure how efficient that'd be,
and I wonder if there's a better way to do it.

Thank you!
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message