Java Mailing List Archive

http://www.java2.5341.com/

Home » java-user.lucene »

"Global" Field question (thread-safe)?

Glen Newton

2008-11-06

Replies: Find Java Web Hosting

Author LoginPost Reply
I have a use case where I want all of my documents to have - in
addition to their other fields - a single field=value.
An example use is where I have multiple Lucene indexes that I search
in parallel, but still need to distinguish them.
Index 1: All documents have: source="a1"
Index 2: All documents have: source="a2"

This is a common use case that has previously been discussed on this list.

The particular question I have is: when I am indexing, can I create a
single Field and use it for all Documents? Note I am in a
multithreaded environment, so many Documents are created and will have
this same Field added to them, and subsequently indexed.

So are their any threading issues with this particular usage?

thanks,

Glen

--

-

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@(protected)
For additional commands, e-mail: java-user-help@(protected)

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.