lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Is it possible to add multiple keywords to a single field from one doc?
Date Mon, 26 May 2008 13:55:14 GMT
I looked at this at one point, and the only difference is that when you
add a field multiple times, the first token for fields 2-n are offset by
the IncrementGap. Unless you override the analyzer and return the
non-default value for GetIncrementGap, there's no difference that I
could find...

Erick

On Mon, May 26, 2008 at 12:24 AM, Daniel Noll <daniel@nuix.com> wrote:

> On Monday 26 May 2008 02:25:40 Tom Conlon wrote:
> > Hi Mark,
> >
> > For example:
> > you have a content field (default) and you also have an 'attributes'
> > field.
> >
> > I'd like to add multiple attributes for a given document rather than
> > just one value and be able to somehow search on the attributes.
> >
> > Ie. Similar to a One-to-many DB relationship between document table(pk
> > docid) and docattribute table (pk docid,attributeid)
>
> Try adding two Field objects with the same name to the same Document, it's
> probably the easiest and most intuitive way to do what you want.
>
> Not sure if there is a drawback to doing it this way, vs. using a single
> field
> and breaking on the whitespace.
>
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message