Thanks, that is as I suspected, but it was not clear. -- Don Reese BIPT PO Box 20159 5971 Cattleridge Blvd Ste 101 Sarasota, FL 34276 [EMAIL PROTECTED] 941-358-8004 x139
Doron Cohen <[EMAIL PROTECTED]> 02/06/2007 01:51 PM Please respond to java-user@lucene.apache.org To java-user@lucene.apache.org cc Subject Re: Newbie question... Hi Don, No, Lucene does not require all documents to have the same set of fields. It is different from a database table - it is all very flexible. So doc1 can have fields f1, f2, and doc2 can have fields f2 f3, and doc3 can have only field f4, and doc4 can have no fields at all (likely that doc4 would not be very useful for doc4, but it is possible). See also Erick's comments here: http://www.nabble.com/forum/ViewPost.jtp?post=8661350&framed=y Regards, Doron [EMAIL PROTECTED] wrote on 06/02/2007 10:30:34: > Hi, > > Sorry if this has been explained before, but could not find anything using > the user archive search... > > I understand the concept of the fields. What is not clear is if an > document must have all fields that are used in the index or not. Now let > me clarify that some, lets say that there are N types of information that > I want to search against, but these types do not lend themselves to > exactly the same fields. Kind of like one index that is for a animal > database and a car database. There are common fields and there are fields > that are unique to each data type. While you may want to look for > 'Mustang' and return hits for both a horse and a ford, you may also want > to look for something unique to the horse. In this example can you define > fields that are only used for one type data but not the other? I do > understand that I could define generic field names and assign data to > them, but I would like the field name to lend meaning to the search. I > guess the alternative is to create N indices and search across then and > merge the results. Just not sure how to proceed at this time. > > Don > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]