Why do you need to instantiate two writers (which I'm pretty sure won't work
if they're pointing to the same index)? It's no problem for a single index
to contain multiple fields, and the fields don't even have to all be present
in each document.

Each field can have it's own analyzer (both for indexing and searching). See
PerFieldAnalyzerWrapper....

I have in mind something like (semi-pseudo-code here, the details are left
as an exercise for the reader<G>).


IndexWriter writer....
PerFieldAnalyzerWrapper pfaw...
pfaw.add("french words", new FrenchAnalyzer()))....
pfaw.add("english words", new EnglishAnalyzer()))....


for each document
 Document doc = ...

 doc.add(new FIeld("french words", "values of french words");
 doc.add(new Field("english words", "values of english words");
 writer.addDocument(doc, pfaw);
end for

and something similar for searching.....

Hope this helps
Erick

Reply via email to