Searched defs:offsets (Results 1 - 19 of 19) sorted by relevance

/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/analysis/
H A DBaseCharFilter.java65 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 DSegmentTermPositionVector.java22 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 DFieldSortedTermVectorMapper.java47 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument
48 TermVectorEntry entry = new TermVectorEntry(currentField, term, frequency, offsets, positions);
H A DSortedTermVectorMapper.java59 * @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 DTermVectorEntry.java26 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 DTermVectorMapper.java62 * @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 DPositionBasedTermVectorMapper.java68 * @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 DTermVectorsReader.java304 // 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/core/src/test/org/apache/lucene/index/
H A DTestPositionBasedTermVectorMapper.java27 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 DTestTermVectorsReader.java43 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 DTestPositionBasedTermVectorMapper.java27 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 DTestTermVectorsReader.java43 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/spellchecker/src/java/org/apache/lucene/search/suggest/
H A DBytesRefList.java45 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/contrib/misc/src/java/org/apache/lucene/index/
H A DTermVectorAccessor.java160 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/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/cl2o/
H A DCompactLabelToOrdinal.java200 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/core/src/java/org/apache/lucene/util/
H A DUnicodeUtil.java140 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 DTermVectorComponent.java98 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/client/ruby/flare/public/javascripts/
H A Ddragdrop.js797 var offsets = Position.cumulativeOffset(dropon); variable
798 Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
802 Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
804 Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/
H A DSolrIndexReader.java114 /** 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];

Completed in 512 milliseconds