lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Howe <silentgun...@gmail.com>
Subject Re: MemoryIndex "field must not be added more than once"
Date Wed, 07 Mar 2012 18:44:10 GMT
Easiest way to do that would be to append all your values together and then
add them in one pass. Unfortunately, you can only add a field + values
once.

-Stephen

On Wed, Mar 7, 2012 at 9:39 AM, Dave Seltzer <dseltzer@tveyes.com> wrote:

> I'm using a MemoryIndex to search in-memory content.
>
> I was wondering if there's a way to specify multiple values for the same
> field in a MemoryIndex.
>
> I've tried addField but it throws an exception:
>
> index.addField("foobar", "value1", LuceneAnalyzer);
> index.addField("foobar", "value2", LuceneAnalyzer);
>
> java.lang.IllegalArgumentException: field must not be added more than once
>
> Thanks!
>
> -Dave
>
> ---------------------------------------------------------------------
> 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