Searched defs:is (Results 1 - 25 of 26) sorted by relevance

12

/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/store/
H A D_TestHelper.java14 * distributed under the License is distributed on an "AS IS" BASIS,
25 * store package. It is used for testing only.
29 /** Returns true if the instance of the provided input stream is actually
32 public static boolean isSimpleFSIndexInput(IndexInput is) { argument
33 return is instanceof SimpleFSIndexInput;
36 /** Returns true if the provided input stream is an SimpleFSIndexInput and
37 * is a clone, that is it does not own its underlying file descriptor.
39 public static boolean isSimpleFSIndexInputClone(IndexInput is) { argument
40 if (isSimpleFSIndexInput(is)) {
54 isSimpleFSIndexInputOpen(IndexInput is) argument
[all...]
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/store/
H A D_TestHelper.java14 * distributed under the License is distributed on an "AS IS" BASIS,
25 * store package. It is used for testing only.
29 /** Returns true if the instance of the provided input stream is actually
32 public static boolean isSimpleFSIndexInput(IndexInput is) { argument
33 return is instanceof SimpleFSIndexInput;
36 /** Returns true if the provided input stream is an SimpleFSIndexInput and
37 * is a clone, that is it does not own its underlying file descriptor.
39 public static boolean isSimpleFSIndexInputClone(IndexInput is) { argument
40 if (isSimpleFSIndexInput(is)) {
54 isSimpleFSIndexInputOpen(IndexInput is) argument
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/store/
H A DInputStreamDataInput.java14 * distributed under the License is distributed on an "AS IS" BASIS,
28 private final InputStream is; field in class:InputStreamDataInput
30 public InputStreamDataInput(InputStream is) { argument
31 this.is = is;
36 int v = is.read();
44 final int cnt = is.read(b, offset, len);
56 is.close();
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/index/
H A DTestIndexInput.java14 * distributed under the License is distributed on an "AS IS" BASIS,
68 private void checkReads(IndexInput is) throws IOException { argument
69 assertEquals(128,is.readVInt());
70 assertEquals(16383,is.readVInt());
71 assertEquals(16384,is.readVInt());
72 assertEquals(16385,is.readVInt());
73 assertEquals(Integer.MAX_VALUE, is.readVInt());
74 assertEquals((long) Integer.MAX_VALUE, is.readVLong());
75 assertEquals(Long.MAX_VALUE, is.readVLong());
76 assertEquals("Lucene",is
[all...]
H A DTestCompoundFile.java14 * distributed under the License is distributed on an "AS IS" BASIS,
65 * byte is written as the start byte provided. All subsequent bytes are
66 * computed as start + offset where offset is the number of the byte.
230 * various length. The file content is generated randomly. The sizes range
232 * logic in the file reading code. For this the chunk variable is set to
281 * which is a sequential file (so that we can easily tell that we are
283 * the size of each file is 1000 bytes.
318 // is still filled
326 // buffer, so an actual IO is attempted, which fails
335 static boolean isCSIndexInput(IndexInput is) { argument
339 isCSIndexInputOpen(IndexInput is) argument
[all...]
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/
H A DTestIndexInput.java14 * distributed under the License is distributed on an "AS IS" BASIS,
116 private void checkReads(DataInput is, Class<? extends Exception> expectedEx) throws IOException { argument
117 assertEquals(128,is.readVInt());
118 assertEquals(16383,is.readVInt());
119 assertEquals(16384,is.readVInt());
120 assertEquals(16385,is.readVInt());
121 assertEquals(Integer.MAX_VALUE, is.readVInt());
122 assertEquals(-1, is.readVInt());
123 assertEquals((long) Integer.MAX_VALUE, is.readVLong());
124 assertEquals(Long.MAX_VALUE, is
159 checkRandomReads(DataInput is) argument
[all...]
H A DTestCompoundFile.java14 * distributed under the License is distributed on an "AS IS" BASIS,
65 * byte is written as the start byte provided. All subsequent bytes are
66 * computed as start + offset where offset is the number of the byte.
230 * various length. The file content is generated randomly. The sizes range
232 * logic in the file reading code. For this the chunk variable is set to
281 * which is a sequential file (so that we can easily tell that we are
283 * the size of each file is 1000 bytes.
318 // is still filled
326 // buffer, so an actual IO is attempted, which fails
335 static boolean isCSIndexInput(IndexInput is) { argument
339 isCSIndexInputOpen(IndexInput is) argument
[all...]
/lucene-3.6.0/lucene/contrib/analyzers/stempel/src/java/org/egothor/stemmer/
H A DMultiTrie.java8 This software is copyrighted by the "Egothor developers". If this
64 * The MultiTrie is a Trie of Tries. It stores words and their associated patch
79 * @param is the input stream
82 public MultiTrie(DataInput is) throws IOException { argument
84 forward = is.readBoolean();
85 BY = is.readInt();
86 for (int i = is.readInt(); i > 0; i--) {
87 tries.add(new Trie(is));
102 * Return the element that is stored in a cell associated with the given key.
121 * Return the element that is store
[all...]
H A DMultiTrie2.java8 This software is copyrighted by the "Egothor developers". If this
64 * The MultiTrie is a Trie of Tries.
74 * @param is the input stream
77 public MultiTrie2(DataInput is) throws IOException { argument
78 super(is);
92 * Return the element that is stored in a cell associated with the given key.
133 * Return the element that is stored as last on a path belonging to the given
137 * @return the element that is stored as last on a path
191 * parameter's length is 0.
H A DRow.java8 This software is copyrighted by the "Egothor developers". If this
74 * @param is the input stream
77 public Row(DataInput is) throws IOException { argument
78 for (int i = is.readInt(); i > 0; i--) {
79 char ch = is.readChar();
81 c.cmd = is.readInt();
82 c.cnt = is.readInt();
83 c.ref = is.readInt();
84 c.skip = is.readInt();
222 * @return the reference, or -1 if the Cell is <t
[all...]
H A DTrie.java8 This software is copyrighted by the "Egothor developers". If this
64 * A Trie is used to store a dictionary of words and their stems.
66 * Actually, what is stored are words with their respective patch commands. A
69 * for which a Trie is constructed.
81 * @param is the input stream
84 public Trie(DataInput is) throws IOException { argument
85 forward = is.readBoolean();
86 root = is.readInt();
87 for (int i = is.readInt(); i > 0; i--) {
88 cmds.add(is
[all...]
/lucene-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/request/
H A DJavaBinUpdateRequestCodec.java12 * distributed under the License is distributed on an "AS IS" BASIS,
46 * @param os the OutputStream to which the request is to be written
85 * @param is the InputStream from which to read
92 public UpdateRequest unmarshal(InputStream is, final StreamingUpdateHandler handler) throws IOException { argument
100 // NOTE: this only works because this is an anonymous inner class
102 // is ever refactored, this will not work.
150 codec.unmarshal(is);
/lucene-3.6.0/lucene/contrib/pruning/src/java/org/apache/lucene/index/pruning/
H A DCarmelUniformTermPruningPolicy.java14 * distributed under the License is distributed on an "AS IS" BASIS,
41 * {@link TermPositions} whose in-document frequency is below a specified
62 * precedence: first a per-term threshold is used if present, then per-field
66 * <code>field:text</code> format. precedence of these values is the following:
70 * documents is established by using a regular {@link IndexSearcher} and
87 IndexSearcher is; field in class:CarmelUniformTermPruningPolicy
105 is = new IndexSearcher(in);
106 is.setSimilarity(sim);
130 is.search(tq, collector);
H A DCarmelTopKTermPruningPolicy.java14 * distributed under the License is distributed on an "AS IS" BASIS,
59 * The claim of this pruning technique is, quoting from the above paper:
66 * whose index is pruned and one whose index is not pruned.</td>
98 private IndexSearcher is; field in class:CarmelTopKTermPruningPolicy
121 * index is either also an original top K result or its original
122 * score is indistinguishable from some original top K result.
124 * difference is smaller or equal to epsilon are considered
127 * pruned index is guaranteed
129 * When null, {@link DefaultSimilarity} is use
[all...]
/lucene-3.6.0/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/
H A DDOMUtils.java22 * distributed under the License is distributed on an "AS IS" BASIS,
92 /* Convenience method where there is only one child Element of a given name */
133 /* Convenience method where there is only one child Element of a given name */
245 * @param is reader of the XML file to be parsed
248 public static Document loadXML(Reader is) argument
267 doc = db.parse(new InputSource(is));
268 //doc = db.parse(is);
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/suggest/fst/
H A DSort.java14 * distributed under the License is distributed on an "AS IS" BASIS,
28 * On-disk sorting of byte arrays. Each byte array (entry) is a composed of the following
52 private static final String MIN_BUFFER_SIZE_MSG = "At least 0.5MB RAM buffer is needed";
84 * is insufficient for sorting consult with max allowed heap size.
182 ByteSequencesReader is = new ByteSequencesReader(input);
186 while ((lines = readPartition(is)) > 0) {
206 IOUtils.close(is);
208 IOUtils.closeWhileHandlingException(is);
213 // If simple rename doesn't work this means the output is
232 * or not available, an IOException is throw
424 private final DataInput is; field in class:Sort.ByteSequencesReader
432 ByteSequencesReader(DataInput is) argument
[all...]
/lucene-3.6.0/solr/core/src/java/org/apache/solr/core/
H A DConfig.java12 * distributed under the License is distributed on an "AS IS" BASIS,
66 public Config(String name, InputStream is, String prefix) throws ParserConfigurationException, IOException, SAXException argument
68 this( null, name, new InputSource(is), prefix );
87 * Note that the 'name' parameter is used to obtain a valid input stream if no valid one is provided through 'is'.
88 * If no valid stream is provided, a valid SolrResourceLoader instance should be provided through 'loader' so
89 * the resource can be opened (@see SolrResourceLoader#openResource); if no SolrResourceLoader instance is provided, a default one
93 * Consider passing a non-null 'name' parameter in all use-cases since it is used for logging & exception reporting.
95 * @param loader the resource loader used to obtain an input stream if 'is' i
105 Config(SolrResourceLoader loader, String name, InputStream is, String prefix) argument
129 Config(SolrResourceLoader loader, String name, InputSource is, String prefix) argument
[all...]
H A DSolrConfig.java12 * distributed under the License is distributed on an "AS IS" BASIS,
85 * @deprecated should simply be removed from code, this funcitonality is handled now by
108 * If the stream is null, the resource loader will open the configuration stream.
109 * If the stream is not null, no attempt to load the resource will occur (the name is not used).
111 *@param is the configuration stream
113 public SolrConfig(String name, InputSource is) argument
115 this( (SolrResourceLoader) null, name, is );
120 *@param name the configuration name used by the loader if the stream is null
121 *@param is th
123 SolrConfig(String instanceDir, String name, InputSource is) argument
136 SolrConfig(SolrResourceLoader loader, String name, InputSource is) argument
[all...]
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/
H A DEnwikiContentSource.java14 * distributed under the License is distributed on an "AS IS" BASIS,
165 //the doc id is the first one in the page. All other ids after that one can be ignored according to the schema
182 final InputStream localFileIS = is;
184 // To work around a bug in XERCES (XERCESJ-1257), we assume the XML is always UTF8, so we simply provide reader.
191 if (localFileIS != is) {
195 // Exception is real
204 } else if (localFileIS == is) {
205 // If file is not already re-opened then re-open it now
206 is = StreamUtils.inputStream(file);
252 // LENGTH is use
280 private InputStream is; field in class:EnwikiContentSource
[all...]
/lucene-3.6.0/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/
H A DMoreLikeThis.java11 * distributed under the License is distributed on an "AS IS" BASIS,
54 * is usually fast enough. But looking up the docFreq() of every term in the document is
60 * reduce the number of terms under consideration. Another heuristic is that terms with a
85 * The simplest possible usage is as follows. The bold
86 * fragment is specific to this class.
91 * IndexSearcher is = ...
97 * Hits hits = is.search(query);
98 * // now the usual iteration thru 'hits' - the only thing to watch for is to make sure
149 * Default maximum number of tokens to parse in each example doc field that is
659 like(java.io.InputStream is) argument
[all...]
/lucene-3.6.0/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/
H A DTestQPHelper.java14 * distributed under the License is distributed on an "AS IS" BASIS,
84 * This test case is a copy of the core Lucene query parser test, it was adapted
646 IndexSearcher is = new IndexSearcher(ramDir, true);
662 // with a Farsi Collator (or an Arabic one for the case when Farsi is
668 ScoreDoc[] result = is.search(qp.parse("[ \u062F TO \u0698 ]", "content"),
672 result = is.search(qp.parse("[ \u0633 TO \u0638 ]", "content"), null, 1000).scoreDocs;
677 result = is.search(qp.parse("[ \u062F TO \u0698 ]", "content"), null, 1000).scoreDocs;
680 result = is.search(qp.parse("[ \u0633 TO \u0638 ]", "content"), null, 1000).scoreDocs;
683 is.close();
757 // Don't set any date resolution and verify if DateField is use
1196 assertHits(int expected, String query, IndexSearcher is) argument
[all...]
H A DTestQueryParserWrapper.java14 * distributed under the License is distributed on an "AS IS" BASIS,
76 * This test case is a copy of the core Lucene query parser test, it was adapted
81 * @deprecated this entire test case tests QueryParserWrapper which is
82 * deprecated. When QPW is gone, so will the test.
439 // make sure OR is the default:
630 IndexSearcher is = new IndexSearcher(ramDir, true);
644 // with a Farsi Collator (or an Arabic one for the case when Farsi is not
649 ScoreDoc[] result = is.search(qp.parse("[ \u062F TO \u0698 ]"), null, 1000).scoreDocs;
652 result = is.search(qp.parse("[ \u0633 TO \u0638 ]"), null, 1000).scoreDocs;
657 result = is
1157 assertHits(int expected, String query, IndexSearcher is) argument
[all...]
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/queryParser/
H A DQueryParserTestBase.java14 * distributed under the License is distributed on an "AS IS" BASIS,
364 // make sure OR is the default:
545 IndexSearcher is = new IndexSearcher(ramDir, true);
558 // with a Farsi Collator (or an Arabic one for the case when Farsi is not
563 ScoreDoc[] result = is.search(qp.parse("[ \u062F TO \u0698 ]"), null, 1000).scoreDocs;
566 result = is.search(qp.parse("[ \u0633 TO \u0638 ]"), null, 1000).scoreDocs;
571 result = is.search(qp.parse("[ \u062F TO \u0698 ]"), null, 1000).scoreDocs;
574 result = is.search(qp.parse("[ \u0633 TO \u0638 ]"), null, 1000).scoreDocs;
577 is.close();
648 // Don't set any date resolution and verify if DateField is use
1067 assertHits(int expected, String query, IndexSearcher is) argument
[all...]
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/queryParser/
H A DQueryParserTestBase.java14 * distributed under the License is distributed on an "AS IS" BASIS,
361 // make sure OR is the default:
537 IndexSearcher is = new IndexSearcher(ramDir, true);
550 // with a Farsi Collator (or an Arabic one for the case when Farsi is not
555 ScoreDoc[] result = is.search(qp.parse("[ \u062F TO \u0698 ]"), null, 1000).scoreDocs;
558 result = is.search(qp.parse("[ \u0633 TO \u0638 ]"), null, 1000).scoreDocs;
563 result = is.search(qp.parse("[ \u062F TO \u0698 ]"), null, 1000).scoreDocs;
566 result = is.search(qp.parse("[ \u0633 TO \u0638 ]"), null, 1000).scoreDocs;
569 is.close();
640 // Don't set any date resolution and verify if DateField is use
1059 assertHits(int expected, String query, IndexSearcher is) argument
[all...]
/lucene-3.6.0/solr/solrj/src/java/org/apache/solr/common/util/
H A DJavaBinCodec.java12 * distributed under the License is distributed on an "AS IS" BASIS,
29 * The class is designed to optimaly serialize/deserialize any supported types in Solr response. As we know there are only a limited type of
30 * items this class can do it with very minimal amount of payload and code. There are 15 known types and if there is an
32 * ObjectResolver and pass it over It is expected that this class is used on both end of the pipes. The class has one
57 * this is a special tag signals an end. No value is associated with it
95 public Object unmarshal(InputStream is) throws IOException { argument
96 FastInputStream dis = FastInputStream.wrap(is);
161 // if top 3 bits are clear, this is
[all...]

Completed in 1662 milliseconds

12