Searched refs:offset (Results 1 - 25 of 238) sorted by relevance

12345678910

/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/payloads/
H A DPayloadHelper.java30 public static byte[] encodeFloat(float payload, byte[] data, int offset){ argument
31 return encodeInt(Float.floatToIntBits(payload), data, offset);
38 public static byte[] encodeInt(int payload, byte[] data, int offset){ argument
39 data[offset] = (byte)(payload >> 24);
40 data[offset + 1] = (byte)(payload >> 16);
41 data[offset + 2] = (byte)(payload >> 8);
42 data[offset + 3] = (byte) payload;
58 * NOTE: the length of the array must be at least offset + 4 long.
60 * @param offset The offset int
65 decodeFloat(byte [] bytes, int offset) argument
70 decodeInt(byte [] bytes, int offset) argument
[all...]
H A DPayloadEncoder.java35 * @param offset
39 Payload encode(char [] buffer, int offset, int length); argument
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/util/encoding/
H A DSimpleIntDecoder.java40 int offset = 0;
41 while (offset < 4) {
42 int nRead = in.read(buffer, offset, 4 - offset);
44 if (offset > 0) {
46 "Need 4 bytes for decoding an int, got only " + offset);
50 offset += nRead;
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/
H A DDocSlice.java27 final int offset; // starting position of the docs (zero based) field in class:DocSlice
38 * @param offset starting offset for this range of docs
44 public DocSlice(int offset, int len, int[] docs, float[] scores, int matches, float maxScore) { argument
45 this.offset=offset;
53 public DocList subset(int offset, int len) { argument
54 if (this.offset == offset && this.len==len) return this;
58 int requestedEnd = offset
75 public int offset() { return offset; } method in class:DocSlice
[all...]
H A DDocList.java24 * document ids starting at <code>offset()</code>.
32 * Returns the zero based offset of this list within the total ordered list of matches to the query.
34 public int offset(); method in interface:DocList
44 * to <code>offset()</code> and <code>size()</code>).
67 public DocList subset(int offset, int len); argument
H A DSortSpec.java31 int offset; field in class:SortSpec
37 public SortSpec(Sort sort, int offset, int num) { argument
39 this.offset=offset;
69 public int getOffset() { return offset; }
80 return "start="+offset+ "&rows="+num + (sort==null ? "" : "&sort="+sort);
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/index/
H A DPayload.java41 /** the offset within the byte array */
42 protected int offset; field in class:Payload
69 * @param offset the offset in the data byte array
72 public Payload(byte[] data, int offset, int length) { argument
73 if (offset < 0 || offset + length > data.length) {
77 this.offset = offset;
95 public void setData(byte[] data, int offset, in argument
[all...]
H A DFieldInvertState.java22 * This class tracks the number and position / offset parameters of terms
32 int offset; field in class:FieldInvertState
41 public FieldInvertState(int position, int length, int numOverlap, int offset, float boost) { argument
45 this.offset = offset;
57 offset = 0;
97 * Get end offset of the last processed term.
98 * @return the offset
101 return offset;
H A DTermPositions.java62 * @param offset the offset in the array into which the data of this payload
67 byte[] getPayload(byte[] data, int offset) throws IOException; argument
/lucene-3.6.0/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/
H A DSimpleBoundaryScanner.java56 // avoid illegal start offset
58 int offset, count = maxScan;
59 for( offset = start; offset > 0 && count > 0; count-- ){
61 if( boundaryChars.contains( buffer.charAt( offset - 1 ) ) ) return offset;
62 offset--;
65 if (offset == 0) {
73 // avoid illegal start offset
75 int offset, coun
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/
H A DCharacterUtils.java58 * @param offset
59 * the offset to the char values in the chars array to be converted
65 * - if the value offset is negative or not less than the length of
68 public abstract int codePointAt(final char[] chars, final int offset); argument
79 * @param offset
80 * the offset to the char values in the chars array to be converted
86 * - if the value offset is negative or not less than the length of
89 public abstract int codePointAt(final CharSequence seq, final int offset); argument
101 * @param offset
102 * the offset t
113 codePointAt(final char[] chars, final int offset, final int limit) argument
163 codePointAt(final char[] chars, final int offset) argument
168 codePointAt(final CharSequence seq, final int offset) argument
173 codePointAt(final char[] chars, final int offset, final int limit) argument
235 codePointAt(final char[] chars, final int offset) argument
240 codePointAt(final CharSequence seq, final int offset) argument
245 codePointAt(final char[] chars, final int offset, final int limit) argument
270 private int offset; field in class:CharacterUtils.CharacterBuffer
276 CharacterBuffer(char[] buffer, int offset, int length) argument
[all...]
H A DPagedBytes.java86 final int offset = (int) (start & blockMask);
88 if (blockSize - offset >= length) {
91 b.offset = offset;
95 b.offset = 0;
96 System.arraycopy(blocks[index], offset, b.bytes, 0, blockSize-offset);
97 System.arraycopy(blocks[1+index], 0, b.bytes, blockSize-offset, length-(blockSize-offset));
115 final int offset
434 readBytes(byte[] b, int offset, int len) argument
479 writeBytes(byte[] b, int offset, int length) argument
[all...]
H A DCharsRef.java23 * Represents char[], as a slice (offset + length) into an existing char[].
31 public int offset; field in class:CharsRef
50 * Creates a new {@link CharsRef} initialized with the given array, offset and
53 public CharsRef(char[] chars, int offset, int length) { argument
55 assert chars.length >= offset + length;
57 this.offset = offset;
67 this.offset = 0;
73 return new CharsRef(chars, offset, length);
80 final int end = offset
[all...]
H A DIntsRef.java20 /** Represents int[], as a slice (offset + length) into an
28 public int offset; field in class:IntsRef
39 public IntsRef(int[] ints, int offset, int length) { argument
42 this.offset = offset;
48 return new IntsRef(ints, offset, length);
55 final int end = offset + length;
56 for(int i = offset; i < end; i++) {
75 int otherUpto = other.offset;
77 final int end = offset
[all...]
H A DStringInterner.java34 public String intern(char[] arr, int offset, int len) { argument
35 return intern(new String(arr, offset, len));
H A DBytesRef.java23 /** Represents byte[], as a slice (offset + length) into an
35 public int offset; field in class:BytesRef
48 public BytesRef(byte[] bytes, int offset, int length) { argument
51 this.offset = offset;
87 // TODO broken if offset != 0
98 public void copyChars(char text[], int offset, int length) { argument
99 UnicodeUtil.UTF16toUTF8(text, offset, length, this);
112 int otherUpto = other.offset;
114 final int end = offset
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/store/
H A DByteArrayDataOutput.java38 public ByteArrayDataOutput(byte[] bytes, int offset, int len) { argument
39 reset(bytes, offset, len);
50 public void reset(byte[] bytes, int offset, int len) { argument
52 pos = offset;
53 limit = offset + len;
67 public void writeBytes(byte[] b, int offset, int length) { argument
69 System.arraycopy(b, offset, bytes, pos, length);
H A DInputStreamDataInput.java42 public void readBytes(byte[] b, int offset, int len) throws IOException { argument
44 final int cnt = is.read(b, offset, len);
50 offset += cnt;
H A DOutputStreamDataOutput.java38 public void writeBytes(byte[] b, int offset, int length) throws IOException { argument
39 os.write(b, offset, length);
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/
H A DPhraseQueue.java32 // rely on: pp.position == tp.position - offset.
33 if (pp1.offset == pp2.offset) {
36 return pp1.offset < pp2.offset;
/lucene-3.6.0/solr/core/src/java/org/apache/solr/util/
H A DNumberUtils.java118 public static int int2sortableStr(int val, char[] out, int offset) { argument
120 out[offset++] = (char)(val >>> 24);
121 out[offset++] = (char)((val >>> 12) & 0x0fff);
122 out[offset++] = (char)(val & 0x0fff);
126 public static int SortableStr2int(String sval, int offset, int len) { argument
127 int val = sval.charAt(offset++) << 24;
128 val |= sval.charAt(offset++) << 12;
129 val |= sval.charAt(offset++);
138 public static int long2sortableStr(long val, char[] out, int offset) { argument
140 out[offset
148 SortableStr2long(String sval, int offset, int len) argument
[all...]
/lucene-3.6.0/lucene/contrib/analyzers/kuromoji/src/java/org/apache/lucene/analysis/ja/
H A DToken.java32 private final int offset; field in class:Token
40 public Token(int wordId, char[] surfaceForm, int offset, int length, Type type, int position, Dictionary dictionary) { argument
43 this.offset = offset;
53 return "Token(\"" + new String(surfaceForm, offset, length) + "\" pos=" + position + " type=" + type + " wordId=" + wordId + " leftID=" + dictionary.getLeftId(wordId) + ")";
64 * @return offset into surfaceForm
67 return offset;
81 return new String(surfaceForm, offset, length);
88 return dictionary.getReading(wordId, surfaceForm, offset, length);
95 return dictionary.getPronunciation(wordId, surfaceForm, offset, lengt
[all...]
/lucene-3.6.0/lucene/contrib/analyzers/kuromoji/src/java/org/apache/lucene/analysis/ja/dict/
H A DUnknownDictionary.java33 public int lookup(char[] text, int offset, int len) { argument
34 if(!characterDefinition.isGroup(text[offset])) {
39 byte characterIdOfFirstCharacter = characterDefinition.getCharacterClass(text[offset]);
42 if (characterIdOfFirstCharacter == characterDefinition.getCharacterClass(text[offset+i])){
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/
H A DTermAttribute.java39 /** Copies the contents of buffer, starting at offset for
42 * @param offset the index in the buffer of the first character to copy
45 public void setTermBuffer(char[] buffer, int offset, int length); argument
52 /** Copies the contents of buffer, starting at offset and continuing
55 * @param offset the index in the buffer of the first character to copy
58 public void setTermBuffer(String buffer, int offset, int length); argument
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/util/
H A DTestCharsRef.java48 int offset = random.nextInt(charArray.length);
49 int length = charArray.length - offset;
50 builder.append(charArray, offset, length);
51 ref.append(charArray, offset, length);
62 int offset = random.nextInt(charArray.length);
63 int length = charArray.length - offset;
64 String str = new String(charArray, offset, length);
65 ref.copyChars(charArray, offset, length);

Completed in 31 milliseconds

12345678910