/lucene-3.6.0/lucene/contrib/demo/src/java/org/apache/lucene/demo/ |
H A D | IndexFiles.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 130 * Indexes the given file using the given writer, or if a directory is given, 133 * NOTE: This method indexes one document per input file. This is slow. For good 134 * throughput, put multiple documents into your input file(s). An example of this is 140 * @param writer Writer to the index where the given file/dir info will be stored 141 * @param file The file to index, or the directory to recurse into to find files to index 144 static void indexDocs(IndexWriter writer, File file) argument [all...] |
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/ |
H A D | PlainTextDictionary.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 30 * Dictionary represented by a text file. 41 public PlainTextDictionary(File file) throws FileNotFoundException { argument 42 in = new BufferedReader(new FileReader(file));
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/ |
H A D | CommandLineUtil.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 40 * @param file The file to be used as parameter constructor 43 public static FSDirectory newFSDirectory(String clazzName, File file) { argument 46 return newFSDirectory(clazz, file); 98 * @param file The file to be used as parameter constructor 105 public static FSDirectory newFSDirectory(Class<? extends FSDirectory> clazz, File file) argument [all...] |
H A D | IOUtils.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 272 * @param file the file to open a reader on 274 * @return a reader to read the given file 276 public static Reader getDecodingReader(File file, Charset charSet) throws IOException { argument 280 stream = new FileInputStream(file); 303 * @return a reader to read the given file
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/ |
H A D | TestIndexWriterOnJRECrash.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 90 + System.getProperty("file.separator") 92 + System.getProperty("file.separator") 124 * Recursively looks for indexes underneath <code>file</code>, 127 public boolean checkIndexes(File file) throws IOException { argument 128 if (file.isDirectory()) { 129 MockDirectoryWrapper dir = newFSDirectory(file); 133 System.err.println("Checking index: " + file); [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/index/ |
H A D | TestIndexWriterOnJRECrash.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 90 + System.getProperty("file.separator") 92 + System.getProperty("file.separator") 124 * Recursively looks for indexes underneath <code>file</code>, 127 public boolean checkIndexes(File file) throws IOException { argument 128 if (file.isDirectory()) { 129 MockDirectoryWrapper dir = newFSDirectory(file); 133 System.err.println("Checking index: " + file); [all...] |
/lucene-3.6.0/lucene/contrib/analyzers/stempel/src/test/org/egothor/stemmer/ |
H A D | TestCompile.java | 11 license applies to a single file or document, the "Egothor developers" 12 are the people or entities mentioned as copyright holders in that file 15 the file CREDITS. This file can be found in the same location as this 120 private static void assertTrie(Trie trie, String file, boolean usefull, argument 123 new FileReader(file)));
|
/lucene-3.6.0/solr/core/src/test/org/apache/solr/handler/admin/ |
H A D | CoreAdminHandlerTest.java | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 87 // verify props are in persisted file 101 public void assertXmlFile(final File file, String... xpath) argument 105 String xml = FileUtils.readFileToString(file, "UTF-8"); 108 String msg = "File XPath failure: file=" + file.getPath() + " xpath="
|
/lucene-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/request/ |
H A D | ContentStreamUpdateRequest.java | 4 * contributor license agreements. See the NOTICE file distributed with 6 * The ASF licenses this file to You under the Apache License, Version 2.0 7 * (the "License"); you may not use this file except in compliance with 58 * @param file The File to add. 59 * @throws IOException if there was an error with the file. 64 public void addFile(File file) throws IOException { argument 65 addContentStream(new ContentStreamBase.FileStream(file));
|
/lucene-3.6.0/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ |
H A D | FileDataSource.java | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 32 * The file is read with the default platform encoding. It can be overriden by 56 * The encoding using which the given file should be read 71 * Returns a reader for the given file. 74 * If the given file is not absolute, we try to construct an absolute path 76 * tried. If file is not found a RuntimeException is thrown. 97 File file = file0; 99 if (!file 126 openStream(File file) argument [all...] |
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/ |
H A D | StreamUtils.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 84 * Returns an {@link InputStream} over the requested file. This method 86 * based on the file name (e.g., if it ends with .bz2 or .bzip, return a 89 public static InputStream inputStream(File file) throws IOException { argument 92 InputStream in = new BufferedInputStream(new FileInputStream(file), BUFFER_SIZE); 93 return fileType(file).inputStream(in); 96 /** Return the type of the file, or null if unknown */ 97 private static Type fileType(File file) { argument 111 outputStream(File file) argument [all...] |
/lucene-3.6.0/solr/core/src/test/org/apache/solr/handler/component/ |
H A D | QueryElevationComponentTest.java | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 315 // write a test file to boost some docs 316 private void writeFile( File file, String query, String ... ids ) throws Exception argument 318 PrintWriter out = new PrintWriter( new FileOutputStream( file ) ); 330 log.info( "OUT:"+file.getAbsolutePath() ); 355 // now change the file
|
/lucene-3.6.0/lucene/contrib/misc/src/java/org/apache/lucene/store/ |
H A D | WindowsDirectory.java | 5 * contributor license agreements. See the NOTICE file distributed with this 7 * licenses this file to You under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance with the License. 83 public WindowsIndexInput(File file, int bufferSize) throws IOException { argument 84 super("WindowsIndexInput(path=\"" + file.getPath() + "\")", bufferSize); 85 fd = WindowsDirectory.open(file.getPath()); 132 /** Opens a handle to a file. */ 135 /** Reads data from a file at pos into bytes */ 138 /** Closes a handle to a file */ 141 /** Returns the length of a file */ [all...] |
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/index/ |
H A D | CompoundFileWriter.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 31 * Combines multiple files into a single compound file. 32 * The file format:<br> 42 * fileCount entries with the raw data of the corresponding file</li> 46 * file. The {directory} that follows has that many entries. Each directory entry 47 * contains a long pointer to the start of this file's data section, and a String 48 * with that file's name. 55 /** source file */ 56 String file; field in class:CompoundFileWriter.FileEntry 124 addFile(String file) argument 132 addFile(String file, Directory dir) argument [all...] |
/lucene-3.6.0/solr/core/src/test/org/apache/solr/handler/ |
H A D | TestCSVLoader.java | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 42 File file = new File(filename); field in class:TestCSVLoader 77 file.delete(); 88 // TODO: stop using locally defined streams once stream.file and 99 loadLocal("stream.file",filename); 109 loadLocal("stream.file",filename,"commit","false"); 118 loadLocal("stream.file",filename,"commit","true"); 127 loadLocal("stream.file",filenam [all...] |
/lucene-3.6.0/solr/solrj/src/java/org/apache/solr/common/util/ |
H A D | ContentStreamBase.java | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 96 private final File file; field in class:ContentStreamBase.FileStream 99 file = f; 102 name = file.getName(); 103 size = file.length(); 104 sourceInfo = file.toURI().toString(); 108 return new FileInputStream( file ); 113 * use a file reade [all...] |
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/store/ |
H A D | RAMInputStream.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 29 private RAMFile file; field in class:RAMInputStream 47 file = f; 48 length = file.length; 97 if (currentBufferIndex >= file.numBuffers()) { 98 // end of file reached, no more buffers left 107 currentBuffer = file.getBuffer(currentBufferIndex);
|
H A D | RAMOutputStream.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 30 private RAMFile file; field in class:RAMOutputStream 45 file = f; 56 final long end = file.length; 65 out.writeBytes(file.getBuffer(buffer++), length); 70 /** Resets this to an empty file. */ 77 file.setLength(0); 87 // set the file lengt [all...] |
H A D | SimpleFSDirectory.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 29 * read from the same file. It's usually better to use 53 /** Creates an IndexInput for the file with the given name. */ 64 // remember if the file is open, so that we don't try to close it 70 public Descriptor(File file, String mode) throws IOException { argument 71 super(file, mode); 85 protected final Descriptor file; field in class:SimpleFSDirectory.SimpleFSIndexInput 98 file [all...] |
H A D | FSDirectory.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 40 * files in the file system. There are currently three core 50 * same file. 54 * synchronization when reading from the same file. 77 * is unable to close the underlying OS file handle. Only when 79 * quite some time later, will the file handle be closed. 128 private static File getCanonicalPath(File file) throws IOException { argument 129 return new File(file 435 private final RandomAccessFile file; field in class:FSDirectory.FSIndexOutput [all...] |
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ |
H A D | LineDocSource.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 35 * {@link org.apache.lucene.document.Document} from a single file. This saves IO 37 * new file for every document.<br> 45 * <li>docs.file=<path to the file> 57 * @param header header line found in the input file, or null if none 101 * the header - any header - of the lines file. 172 private File file; field in class:LineDocSource [all...] |
/lucene-3.6.0/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/ |
H A D | LineDocSourceTest.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 52 private void createBZ2LineFile(File file, boolean addHeader) throws Exception { argument 53 OutputStream out = new FileOutputStream(file); 90 private void createRegularLineFile(File file, boolean addHeader) throws Exception { argument 91 OutputStream out = new FileOutputStream(file); 97 private void createRegularLineFileWithMoreFields(File file, String...extraFields) throws Exception { argument 98 OutputStream out = new FileOutputStream(file); 108 private void doIndexAndSearchTest(File file, Clas argument 114 doIndexAndSearchTestWithRepeats(File file, Class<? extends LineParser> lineParserClass, int numAdds, String storedField) argument [all...] |
/lucene-3.6.0/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/ |
H A D | WriteLineDocTaskTest.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 139 private PerfRunData createPerfRunData(File file, argument 144 props.setProperty("line.file.out", file.getAbsolutePath()); 157 private void doReadTest(File file, Type fileType, String expTitle, argument 159 InputStream in = new FileInputStream(file); 170 assertFalse("Unknown file type!",true); //fail, should not happen 200 File file [all...] |
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/cl2o/ |
H A D | CompactLabelToOrdinal.java | 17 * contributor license agreements. See the NOTICE file distributed with 19 * The ASF licenses this file to You under the Apache License, Version 2.0 20 * (the "License"); you may not use this file except in compliance with 449 * Opens the file and reloads the CompactLabelToOrdinal. The file it expects 452 static CompactLabelToOrdinal open(File file, float loadFactor, argument 455 * Part of the file is the labelRepository, which needs to be rehashed 457 * can't just store these off in the file as well, but in keeping with 467 new FileInputStream(file))); 493 // that array offsets will work). Since the initial file i 540 flush(File file) argument [all...] |
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/suggest/fst/ |
H A D | Sort.java | 5 * contributor license agreements. See the NOTICE file distributed with 7 * The ASF licenses this file to You under the Apache License, Version 2.0 8 * (the "License"); you may not use this file except in compliance with 195 for (File file : merges) { 196 file.delete(); 221 for (File file : merges) { 222 file.delete(); 248 * Copies one file to another. 250 private static void copy(File file, File output) throws IOException { argument 256 is = new FileInputStream(file); 381 ByteSequencesWriter(File file) argument 426 ByteSequencesReader(File file) argument [all...] |