public void flush(Collection threads, DocumentsWriter.FlushState state) throws IOException { Map childThreadsAndFields = new HashMap(); Iterator it = threads.iterator(); while(it.hasNext()) { DocFieldProcessorPerThread perThread = (DocFieldProcessorPerThread) it.next(); childThreadsAndFields.put(perThread.consumer, perThread.fields()); perThread.trimFields(state); } consumer.flush(childThreadsAndFields, state); // Important to save after asking consumer to flush so // consumer can alter the FieldInfo* if necessary. EG, // FreqProxTermsWriter does this with // FieldInfo.storePayload. fieldInfos.write(state.directory, state.segmentName + ".fnm"); }
public void write(Directory d, String name) throws IOException { OutputStream output = d.createFile(name); try { write(output); } finally { output.close(); } }
public void flush(Collection threads, DocumentsWriter.FlushState state) throws IOException { Map childThreadsAndFields = new HashMap(); Iterator it = threads.iterator(); while(it.hasNext()) { DocFieldProcessorPerThread perThread = (DocFieldProcessorPerThread) it.next(); childThreadsAndFields.put(perThread.consumer, perThread.fields()); perThread.trimFields(state); } consumer.flush(childThreadsAndFields, state); // Important to save after asking consumer to flush so // consumer can alter the FieldInfo* if necessary. EG, // FreqProxTermsWriter does this with // FieldInfo.storePayload. fieldInfos.write(state.directory, state.segmentName + ".fnm"); }
public void write(Directory d, String name) throws IOException { IndexOutput output = d.createOutput(name); try { write(output); } finally { output.close(); } }
public void write(Directory d, String name) throws IOException { IndexOutput output = d.createOutput(name); try { write(output); } finally { output.close(); } }
fieldInfos.add(reader.getFieldNames(false), false); fieldInfos.write(directory, segment + ".fnm");
fieldInfos.write(directory, segment + ".fnm");
fieldInfos.write(directory, segment + ".fnm");
fieldInfos.write(directory, segment + ".fnm");