327328329330331332333334335336337
int n = fieldInfos.fieldNumber(field.name()); float norm = fieldBoosts[n] * similarity.lengthNorm(field.name(),fieldLengths[n]); OutputStream norms = directory.createFile(segment + ".f" + n); try { norms.writeByte(similarity.encodeNorm(norm)); } finally { norms.close(); } } }
106107108109110111112113114115116
throws IOException { OutputStream os = dir.createFile(name); for (int i=0; i<size; i++) { byte b = (byte) (Math.random() * 256); os.writeByte(b); } os.close(); } /** Creates a file of the specified size with sequential data. The first
123124125126127128129130131132133
int size) throws IOException { OutputStream os = dir.createFile(name); for (int i=0; i < size; i++) { os.writeByte(start); start ++; } os.close(); }
352353354355356357358359360361362
throws IOException { // Setup the test file - we need more than 1024 bytes OutputStream os = fsdir.createFile(file); for(int i=0; i<2000; i++) { os.writeByte((byte) i); } os.close(); InputStream in = fsdir.openFile(file);
306307308309310311312313314315316
byte[] input = reader.norms(fi.name); int maxDoc = reader.maxDoc(); for (int k = 0; k < maxDoc; k++) { byte norm = input != null ? input[k] : (byte)0; if (!reader.isDeleted(k)) { output.writeByte(norm); } } } } finally { output.close();
96979899100101102103104105106
//System.out.println("filling " + name + " with " + length + " of " + b); OutputStream file = store.createFile(name); for (int j = 0; j < length; j++) file.writeByte(b); file.close(); } store.close();
422423424425426427428429430431432
byte[] input = reader.norms(fi.name); int maxDoc = reader.maxDoc(); for (int k = 0; k < maxDoc; k++) { byte norm = input != null ? input[k] : (byte) 0; if (!reader.isDeleted(k)) { output.writeByte(norm); } } } } finally { output.close();
5859606162636465666768
321322323324325326327328329330331
FieldInfo fi = fieldInfos.fieldInfo(n); if(fi.isIndexed){ float norm = fieldBoosts[n] * similarity.lengthNorm(fi.name, fieldLengths[n]); OutputStream norms = directory.createFile(segment + ".f" + n); try { norms.writeByte(Similarity.encodeNorm(norm)); } finally { norms.close(); } } }
6869707172737475767778