lucene-java-user mailing list archives

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

Hey!

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!
-Matt
-- 
View this message in context: http://www.nabble.com/Searching-documents-that-contain-a-field-%28text-of-field-is-irrelevant%29-tp23826263p23826263.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message