lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Newbie question...
Date Tue, 06 Feb 2007 18:47:34 GMT
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

Don.Reese@BIPT.COM 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
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