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

/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/index/
H A DSegmentTermPositionVector.java21 protected int[][] positions; field in class:SegmentTermPositionVector
25 public SegmentTermPositionVector(String field, String terms[], int termFreqs[], int[][] positions, TermVectorOffsetInfo[][] offsets) { argument
28 this.positions = positions;
50 * Returns an array of positions in which the term is found.
56 if(positions == null)
58 if (index >=0 && index < positions.length)
60 result = positions[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.java24 * NOTE: This Mapper ignores all Field information for the Document. This means that if you are using offset/positions you will not
60 * @param positions Position information, may be null
64 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument
69 storePositions == true ? positions : null);
77 //A few diff. cases here: offsets is null, existing offsets is null, both are null, same for positions
95 if (existingPositions != null && positions != null && positions.length > 0)
97 int [] newPositions = new int[existingPositions.length + positions.length];
99 System.arraycopy(positions, 0, newPositions, existingPositions.length, positions
[all...]
H A DTermVectorEntry.java27 int [] positions; field in class:TermVectorEntry
33 public TermVectorEntry(String field, String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument
38 this.positions = positions;
55 return positions;
71 void setPositions(int[] positions) { argument
72 this.positions = positions;
H A DTermVectorMapper.java39 * @param ignoringPositions true if this mapper should tell Lucene to ignore positions even if they are stored
55 * @param storePositions true if the mapper should expect positions info
63 * @param positions null if the position is not specified, otherwise the position in the field of the term
65 public abstract void map(String term, int frequency, TermVectorOffsetInfo [] offsets, int [] positions); argument
68 * Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they
69 * can be skipped over. Derived classes should set this to true if they want to ignore positions. The default
70 * is false, meaning positions will be loaded if they are stored.
H A DPositionBasedTermVectorMapper.java56 * Never ignores positions. This mapper doesn't make much sense unless there are positions
69 * @param positions
72 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument
73 for (int i = 0; i < positions.length; i++) {
74 Integer posVal = Integer.valueOf(positions[i]);
77 pos = new TVPositionInfo(positions[i], storeOffsets);
89 * @param storePositions Whether positions are available
95 throw new RuntimeException("You must store positions in order to use this Mapper");
H A DTermVectorsReader.java471 int [] positions = null;
472 if (storePositions) { //read in the positions
473 //does the mapper even care about positions?
475 positions = new int[freq];
479 positions[j] = prevPosition + tvf.readVInt();
480 prevPosition = positions[j];
483 //we need to skip over the positions. Since these are VInts, I don't believe there is anyway to know for sure how far to skip
510 mapper.map(term, freq, offsets, positions);
540 private int positions[][]; field in class:ParallelArrayTermVectorMapper
555 this.positions
561 map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) argument
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/
H A DSpanFilterResult.java31 private List<PositionInfo> positions;//Spans spans; field in class:SpanFilterResult
36 * @param positions A List of {@link org.apache.lucene.search.SpanFilterResult.PositionInfo} objects
38 public SpanFilterResult(DocIdSet docIdSet, List<PositionInfo> positions) { argument
40 this.positions = positions;
49 return positions;
59 private List<StartEnd> positions; field in class:SpanFilterResult.PositionInfo
64 positions = new ArrayList<StartEnd>();
69 positions.add(new StartEnd(start, end));
81 return positions;
[all...]
H A DMultiPhraseQuery.java44 private ArrayList<Integer> positions = new ArrayList<Integer>(); field in class:MultiPhraseQuery
70 if (positions.size() > 0)
71 position = positions.get(positions.size()-1).intValue() + 1;
96 positions.add(Integer.valueOf(position));
108 * Returns the relative positions of terms in this phrase.
111 int[] result = new int[positions.size()];
112 for (int i = 0; i < positions.size(); i++)
113 result[i] = positions.get(i).intValue();
200 postingsFreqs[pos] = new PhraseQuery.PostingsAndFreq(p, docFreq, positions
[all...]
H A DPhraseQuery.java40 private ArrayList<Integer> positions = new ArrayList<Integer>(4); field in class:PhraseQuery
71 if(positions.size() > 0)
72 position = positions.get(positions.size()-1).intValue() + 1;
93 positions.add(Integer.valueOf(position));
103 * Returns the relative positions of terms in this phrase.
106 int[] result = new int[positions.size()];
107 for(int i = 0; i < positions.size(); i++)
108 result[i] = positions.get(i).intValue();
242 postingsFreqs[i] = new PostingsAndFreq(p, reader.docFreq(t), positions
[all...]
/lucene-3.6.0/lucene/contrib/pruning/src/java/org/apache/lucene/index/pruning/
H A DTFTermPruningPolicy.java129 public int pruneSomePositions(int docNum, int[] positions, Term curTerm) { argument
H A DTermPruningPolicy.java36 * <li>all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term)</li>
37 * <li>some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)</li>
135 * @param in input term positions
145 * @param in positioned term positions
146 * @param curTerm current term associated with these positions
183 * @param termPositions positioned term positions. Implementations MUST NOT
196 * @param positions original term positions in the document (and indirectly
201 * positions array must be set to -1 to indicate which positions t
203 pruneSomePositions(int docNum, int[] positions, Term curTerm) argument
[all...]
H A DCarmelUniformTermPruningPolicy.java174 public int pruneSomePositions(int docNum, int[] positions, Term curTerm) { argument
H A DRIDFTermPruningPolicy.java112 public int pruneSomePositions(int docNum, int[] positions, Term curTerm) { argument
H A DCarmelTopKTermPruningPolicy.java230 public int pruneSomePositions(int docNum, int[] positions, Term curTerm) { argument
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/spans/
H A DTermSpans.java31 protected TermPositions positions; field in class:TermSpans
39 public TermSpans(TermPositions positions, Term term) throws IOException { argument
41 this.positions = positions;
49 if (!positions.next()) {
53 doc = positions.doc();
54 freq = positions.freq();
57 position = positions.nextPosition();
64 if (!positions.skipTo(target)) {
69 doc = positions
[all...]
/lucene-3.6.0/lucene/contrib/misc/src/java/org/apache/lucene/index/
H A DTermVectorAccessor.java72 private List<int[]> positions; field in class:TermVectorAccessor
92 positions = new ArrayList<int[]>(500);
97 positions.clear();
111 int[] positions = new int[termPositions.freq()];
112 for (int i = 0; i < positions.length; i++) {
113 positions[i] = termPositions.nextPosition();
115 this.positions.add(positions);
117 positions.add(null);
128 mapper.map(tokens.get(i), frequencies.get(i).intValue(), (TermVectorOffsetInfo[]) null, positions
160 map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) argument
[all...]
/lucene-3.6.0/lucene/contrib/pruning/src/java/org/apache/lucene/index/
H A DPruningReader.java168 int[][] positions = new int[terms.length - removed][];
174 positions[j] = ((TermPositionVector) v).getTermPositions(i);
175 if (positions[j] != null && positions[j].length > 0) {
181 withPositions ? positions : null,
204 * Applies {@link TermPruningPolicy} to term positions.
252 protected int[] positions; field in class:PruningReader.PruningTermPositions
282 positions = null;
291 // prepare the positions
292 positions
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/payloads/
H A DPayloadTermQuery.java39 * in the value of the payload located at each of the positions where the
96 protected TermPositions positions; field in class:PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
103 positions = spans.getPositions();
122 more = spans.next();// this moves positions to the next match in this
129 if (positions.isPayloadAvailable()) {
130 payload = positions.getPayload(payload, 0);
134 .end(), payload, 0, positions.getPayloadLength()));
/lucene-3.6.0/lucene/contrib/analyzers/kuromoji/src/java/org/apache/lucene/analysis/ja/
H A DGraphvizFormatter.java63 void onBacktrace(JapaneseTokenizer tok, WrappedPositionArray positions, int lastBackTracePos, Position endPosData, int fromIDX, char[] fragment, boolean isEnd) { argument
64 setBestPathMap(positions, lastBackTracePos, endPosData, fromIDX);
65 sb.append(formatNodes(tok, positions, lastBackTracePos, endPosData, fragment));
75 private void setBestPathMap(WrappedPositionArray positions, int startPos, Position endPosData, int fromIDX) { argument
81 final Position posData = positions.get(pos);
97 private String formatNodes(JapaneseTokenizer tok, WrappedPositionArray positions, int startPos, Position endPosData, char[] fragment) { argument
102 final Position posData = positions.get(pos);
116 final Position posData = positions.get(pos);
118 final Position backPosData = positions.get(posData.backPos[idx]);
H A DJapaneseTokenizer.java141 private final WrappedPositionArray positions = new WrappedPositionArray(); field in class:JapaneseTokenizer
248 positions.reset();
257 positions.get(0).add(0, 0, -1, -1, -1, Type.KNOWN);
415 System.out.println(" + cost=" + leastCost + " wordID=" + wordID + " leftID=" + leftID + " leastIDX=" + leastIDX + " toPos=" + endPos + " toPos.idx=" + positions.get(endPos).count);
428 //positions.get(endPos).add(leastCost, dict.getRightId(wordID), fromPosData.pos, leastIDX, wordID, type);
430 positions.get(endPos).add(leastCost, leftID, fromPosData.pos, leastIDX, wordID, type);
481 private Position[] positions = new Position[8]; field in class:JapaneseTokenizer.WrappedPositionArray
484 for(int i=0;i<positions.length;i++) {
485 positions[i] = new Position();
489 // Next array index to write to in positions
[all...]
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/
H A DTestTermVectorsReader.java42 private int[][] positions = new int[testTerms.length][]; field in class:TestTermVectorsReader
73 positions[i] = new int[TERM_FREQ];
77 // positions are always sorted in increasing order
78 positions[i][j] = (int) (j * 10 + Math.random() * 10);
83 token.pos = positions[i][j];
206 int[] positions = vector.getTermPositions(i);
207 assertTrue(positions != null);
208 assertTrue(positions.length == this.positions[i].length);
209 for (int j = 0; j < positions
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 DTestTermVectorsReader.java42 private int[][] positions = new int[testTerms.length][]; field in class:TestTermVectorsReader
73 positions[i] = new int[TERM_FREQ];
77 // positions are always sorted in increasing order
78 positions[i][j] = (int) (j * 10 + Math.random() * 10);
83 token.pos = positions[i][j];
205 int[] positions = vector.getTermPositions(i);
206 assertTrue(positions != null);
207 assertTrue(positions.length == this.positions[i].length);
208 for (int j = 0; j < positions
434 map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) argument
[all...]
/lucene-3.6.0/solr/core/src/java/org/apache/solr/handler/component/
H A DTermVectorComponent.java97 allFields.positions = params.getBool(TermVectorParams.POSITIONS, false);
106 allFields.positions = true;
144 option.positions = params.getFieldBool(field, TermVectorParams.POSITIONS, allFields.positions);
145 if (option.positions && !sf.storeTermPositions()){
304 public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) { argument
321 for (int i = 0; i < positions.length; i++) {
322 positionsNL.add("position", positions[i]);
324 termInfo.add("positions", positionsNL);
353 usePositions = storePositions && fieldOptions.positions;
409 boolean termFreq, positions, offsets, docFreq, tfIdf; field in class:FieldOptions
[all...]
/lucene-3.6.0/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/
H A DMemoryIndex.java187 /** pos: positions[3*i], startOffset: positions[3*i +1], endOffset: positions[3*i +2] */
242 * {@link org.apache.lucene.document.Field.TermVector#WITH_POSITIONS termVectorStored with positions} (or
243 * {@link org.apache.lucene.document.Field.TermVector#WITH_POSITIONS termVectorStored with positions and offsets}),
369 ArrayIntList positions = terms.get(term);
370 if (positions == null) { // term not seen before
371 positions = new ArrayIntList(stride);
372 terms.put(term, positions);
375 positions
482 numPositions(ArrayIntList positions) argument
[all...]

Completed in 99 milliseconds