/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/analysis/ |
H A D | BaseCharFilter.java | 65 private int offsets[]; field in class:BaseCharFilter 76 if (offsets == null || currentOff < offsets[0]) { 81 if(currentOff >= offsets[hi]) 89 if (currentOff < offsets[mid]) 91 else if (currentOff > offsets[mid]) 97 if (currentOff < offsets[mid]) 104 return offsets == null ? 122 if (offsets == null) { 123 offsets [all...] |
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/index/ |
H A D | SegmentTermPositionVector.java | 22 protected TermVectorOffsetInfo[][] offsets; field in class:SegmentTermPositionVector 25 public SegmentTermPositionVector(String field, String terms[], int termFreqs[], int[][] positions, TermVectorOffsetInfo[][] offsets) { argument 27 this.offsets = offsets; 34 * @param index The position in the array to get the offsets from 40 if(offsets == null) 42 if (index >=0 && index < offsets.length) 44 result = offsets[index];
|
H A D | TermVectorEntry.java | 26 private TermVectorOffsetInfo [] offsets; field in class:TermVectorEntry 33 public TermVectorEntry(String field, String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 37 this.offsets = offsets; 51 return offsets; 67 void setOffsets(TermVectorOffsetInfo[] offsets) { argument 68 this.offsets = offsets;
|
H A D | PositionBasedTermVectorMapper.java | 68 * @param offsets 72 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 80 pos.addTerm(term, offsets != null ? offsets[i] : null); 88 * @param storeOffsets Whether offsets are available 99 //ignoring offsets 125 private List<TermVectorOffsetInfo> offsets; field in class:PositionBasedTermVectorMapper.TVPositionInfo 132 offsets = new ArrayList<TermVectorOffsetInfo>(); 139 if (offsets != null) { 140 offsets [all...] |
H A D | SortedTermVectorMapper.java | 59 * @param offsets Offset information, may be null 64 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 68 storeOffsets == true ? offsets : null, 77 //A few diff. cases here: offsets is null, existing offsets is null, both are null, same for positions 78 if (existingOffsets != null && offsets != null && offsets.length > 0) 80 //copy over the existing offsets 81 TermVectorOffsetInfo [] newOffsets = new TermVectorOffsetInfo[existingOffsets.length + offsets.length]; 83 System.arraycopy(offsets, [all...] |
H A D | TermVectorMapper.java | 62 * @param offsets null if the offset is not specified, otherwise the offset into the field of the term 65 public abstract void map(String term, int frequency, TermVectorOffsetInfo [] offsets, int [] positions); argument 80 * @see #isIgnoringPositions() Same principal as {@link #isIgnoringPositions()}, but applied to offsets. false by default.
|
H A D | FieldSortedTermVectorMapper.java | 47 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 48 TermVectorEntry entry = new TermVectorEntry(currentField, term, frequency, offsets, positions);
|
H A D | TermVectorsWriter.java | 97 // May have positions & offsets 152 final TermVectorOffsetInfo[] offsets = tpVector.getOffsets(j); 153 if (offsets == null) 154 throw new IllegalStateException("Trying to write offsets that are null!"); 155 assert offsets.length == termFreq; 157 // use delta encoding for offsets 159 for(int k=0;k<offsets.length;k++) { 160 final int startOffset = offsets[k].getStartOffset(); 161 final int endOffset = offsets[k].getEndOffset();
|
H A D | TermVectorsReader.java | 304 // Reads the long[] offsets into TVF; you have to pre-seek 491 TermVectorOffsetInfo[] offsets = null; 493 //does the mapper even care about offsets? 495 offsets = new TermVectorOffsetInfo[freq]; 500 offsets[j] = new TermVectorOffsetInfo(startOffset, endOffset); 510 mapper.map(term, freq, offsets, positions); 541 private TermVectorOffsetInfo offsets[][]; field in class:ParallelArrayTermVectorMapper 557 this.offsets = new TermVectorOffsetInfo[numTerms][]; 561 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 566 this.offsets[currentPositio [all...] |
/lucene-3.6.0/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/suggest/ |
H A D | BytesRefList.java | 45 private int[] offsets = new int[1]; field in class:BytesRefList 67 Arrays.fill(offsets, 0); 77 if (lastElement >= offsets.length) { 78 int oldLen = offsets.length; 79 offsets = ArrayUtil.grow(offsets, offsets.length + 1); 80 bytesUsed.addAndGet((offsets.length - oldLen) 84 offsets[lastElement++] = currentOffset; 105 spare.offset = offsets[or [all...] |
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/ |
H A D | TestPositionBasedTermVectorMapper.java | 27 protected TermVectorOffsetInfo[][] offsets; field in class:TestPositionBasedTermVectorMapper 35 offsets = new TermVectorOffsetInfo[tokens.length][]; 45 offsets[i] = new TermVectorOffsetInfo[thePositions[i].length]; 46 for (int j = 0; j < offsets[i].length; j++) { 47 offsets[i][j] = new TermVectorOffsetInfo(j, j + 1);//the actual value here doesn't much matter 52 offsets[tokens.length - 1] = new TermVectorOffsetInfo[1]; 53 offsets[tokens.length - 1][0] = new TermVectorOffsetInfo(0, 1);
|
H A D | TestTermVectorsReader.java | 43 private TermVectorOffsetInfo[][] offsets = new TermVectorOffsetInfo[testTerms.length][]; field in class:TestTermVectorsReader 74 offsets[i] = new TermVectorOffsetInfo[TERM_FREQ]; 79 // offsets are always sorted in increasing order 80 offsets[i][j] = new TermVectorOffsetInfo(j * 10, j * 10 + testTerms[i].length()); 84 token.startOffset = offsets[i][j].getStartOffset(); 85 token.endOffset = offsets[i][j].getEndOffset(); 215 assertTrue(offset.length == this.offsets[i].length); 218 assertTrue(termVectorOffsetInfo.equals(offsets[i][j])); 256 assertTrue(offset.length == this.offsets[i].length); 259 assertTrue(termVectorOffsetInfo.equals(offsets[ 435 map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) argument [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/index/ |
H A D | TestPositionBasedTermVectorMapper.java | 27 protected TermVectorOffsetInfo[][] offsets; field in class:TestPositionBasedTermVectorMapper 35 offsets = new TermVectorOffsetInfo[tokens.length][]; 45 offsets[i] = new TermVectorOffsetInfo[thePositions[i].length]; 46 for (int j = 0; j < offsets[i].length; j++) { 47 offsets[i][j] = new TermVectorOffsetInfo(j, j + 1);//the actual value here doesn't much matter 52 offsets[tokens.length - 1] = new TermVectorOffsetInfo[1]; 53 offsets[tokens.length - 1][0] = new TermVectorOffsetInfo(0, 1);
|
H A D | TestTermVectorsReader.java | 43 private TermVectorOffsetInfo[][] offsets = new TermVectorOffsetInfo[testTerms.length][]; field in class:TestTermVectorsReader 74 offsets[i] = new TermVectorOffsetInfo[TERM_FREQ]; 79 // offsets are always sorted in increasing order 80 offsets[i][j] = new TermVectorOffsetInfo(j * 10, j * 10 + testTerms[i].length()); 84 token.startOffset = offsets[i][j].getStartOffset(); 85 token.endOffset = offsets[i][j].getEndOffset(); 214 assertTrue(offset.length == this.offsets[i].length); 217 assertTrue(termVectorOffsetInfo.equals(offsets[i][j])); 255 assertTrue(offset.length == this.offsets[i].length); 258 assertTrue(termVectorOffsetInfo.equals(offsets[ 434 map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) argument [all...] |
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/cl2o/ |
H A D | CompactLabelToOrdinal.java | 200 int[] sourceOffsetArray = this.hashArrays[i].offsets; 206 int[] targetOffsetArray = this.hashArrays[j].offsets; 221 for (int i = 0; i < temp.offsets.length; i++) { 222 int offset = temp.offsets[i]; 244 int index = CompactLabelToOrdinal.indexFor(hash, a.offsets.length); 245 int offset = a.offsets[index]; 248 a.offsets[index] = this.labelRepository.length(); 264 int index = CompactLabelToOrdinal.indexFor(hash, a.offsets.length); 265 int offset = a.offsets[index]; 268 a.offsets[inde 561 int[] offsets; field in class:CompactLabelToOrdinal.HashArray [all...] |
/lucene-3.6.0/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/ |
H A D | TokenStreamFromTermPositionVector.java | 50 * creating the TokenStream. Must have positions and offsets. 59 final TermVectorOffsetInfo[] offsets = termPositionVector.getOffsets(i); 63 if (offsets != null) { 65 offsets[j].getStartOffset(), offsets[j].getEndOffset());
|
H A D | TokenSources.java | 43 * with the higlighter - can obtain from TermFreqVectors with offsets and 196 TermVectorOffsetInfo[] offsets = tpv.getOffsets(t); 197 if (offsets == null) { 214 for (int tp = 0; tp < offsets.length; tp++) { 215 Token token = new Token(terms[t], offsets[tp].getStartOffset(), offsets[tp] 231 Token token = new Token(terms[t], offsets[tp].getStartOffset(), 232 offsets[tp].getEndOffset());
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/ |
H A D | UnicodeUtil.java | 140 public int[] offsets = new int[10]; field in class:UnicodeUtil.UTF16Result 489 if (result.offsets.length <= end) { 490 result.offsets = ArrayUtil.grow(result.offsets, end+1); 492 final int[] offsets = result.offsets; 497 while(offsets[upto] == -1) 500 int outUpto = offsets[upto]; 512 offsets[upto++] = outUpto; 519 offsets[upt [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/handler/component/ |
H A D | TermVectorComponent.java | 98 allFields.offsets = params.getBool(TermVectorParams.OFFSETS, false); 107 allFields.offsets = true; 148 option.offsets = params.getFieldBool(field, TermVectorParams.OFFSETS, allFields.offsets); 149 if (option.offsets && !sf.storeTermOffsets()){ 304 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 312 termInfo.add("offsets", theOffsets); 313 for (int i = 0; i < offsets.length; i++) { 314 TermVectorOffsetInfo offset = offsets[i]; 352 useOffsets = storeOffsets && fieldOptions.offsets; 409 boolean termFreq, positions, offsets, docFreq, tfIdf; field in class:FieldOptions [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/function/ |
H A D | FunctionQuery.java | 103 int[] offsets = topReader.getLeafOffsets(); 104 int readerPos = SolrIndexReader.readerIndex(doc, offsets); 105 int readerBase = offsets[readerPos];
|
H A D | BoostedQuery.java | 111 int[] offsets = topReader.getLeafOffsets(); 112 int readerPos = SolrIndexReader.readerIndex(doc, offsets); 113 int readerBase = offsets[readerPos];
|
/lucene-3.6.0/lucene/contrib/misc/src/java/org/apache/lucene/index/ |
H A D | TermVectorAccessor.java | 160 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument 161 decorated.map(term, frequency, offsets, positions);
|
/lucene-3.6.0/lucene/contrib/pruning/src/java/org/apache/lucene/index/ |
H A D | PruningReader.java | 154 TermVectorOffsetInfo[][] offsets = new TermVectorOffsetInfo[terms.length - removed][]; 161 offsets[j] = ((TermPositionVector) v).getOffsets(i); 162 if (offsets[j] != null && offsets[j] != TermVectorOffsetInfo.EMPTY_OFFSET_INFO) { 182 withOffsets ? offsets : null);
|
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/ |
H A D | SolrIndexReader.java | 114 /** Return the doc id offsets for each leaf reader. This will be different than getBase() for 121 /** Given an array of IndexReader offsets, find which contains the given doc */ 122 public static int readerIndex(int doc, int[] offsets) { // find reader for doc doc: argument 123 int high = offsets.length - 1; 126 if (high <= 0 || doc < offsets[1]) return 0; 132 int offset = offsets[mid];
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/ |
H A D | TestTermVectors.java | 166 TermVectorOffsetInfo [] offsets = posVec.getOffsets(j); 176 assertTrue(offsets != null); 177 assertTrue(offsets.length > 0); 180 assertTrue(offsets == null); 445 TermVectorOffsetInfo[] offsets = tfv.getOffsets(0); 446 assertEquals(5, offsets.length); 448 assertEquals(4*i, offsets[i].getStartOffset()); 449 assertEquals(4*i+3, offsets[i].getEndOffset());
|