mirror of https://github.com/apache/lucene.git
fix documentation-lint
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4765@1446665 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7e02f0fb4b
commit
3572f7a351
|
@ -103,7 +103,7 @@ public final class FieldInfo {
|
|||
*/
|
||||
SORTED,
|
||||
/**
|
||||
* A pre-sorted Set<byte[]>. Fields with this type only store distinct byte values
|
||||
* A pre-sorted Set<byte[]>. Fields with this type only store distinct byte values
|
||||
* and store additional offset pointers per document to dereference the shared
|
||||
* byte[]s. The stored byte[] is presorted and allows access via document id,
|
||||
* ordinal and by-value.
|
||||
|
|
|
@ -269,6 +269,7 @@ public class MultiDocValues {
|
|||
|
||||
/** maps per-segment ordinals to/from global ordinal space */
|
||||
// TODO: use more efficient packed ints structures?
|
||||
// TODO: pull this out? its pretty generic (maps between N ord()-enabled TermsEnums)
|
||||
public static class OrdinalMap {
|
||||
// cache key of whoever asked for this aweful thing
|
||||
final Object owner;
|
||||
|
@ -279,6 +280,14 @@ public class MultiDocValues {
|
|||
// segmentOrd -> (globalOrd - segmentOrd)
|
||||
final AppendingLongBuffer ordDeltas[];
|
||||
|
||||
/**
|
||||
* Creates an ordinal map that allows mapping ords to/from a merged
|
||||
* space from <code>subs</code>.
|
||||
* @param owner a cache key
|
||||
* @param subs TermsEnums that support {@link TermsEnum#ord()}. They need
|
||||
* not be dense (e.g. can be FilteredTermsEnums}.
|
||||
* @throws IOException if an I/O error occurred.
|
||||
*/
|
||||
public OrdinalMap(Object owner, TermsEnum subs[]) throws IOException {
|
||||
// create the ordinal mappings by pulling a termsenum over each sub's
|
||||
// unique terms, and walking a multitermsenum over those
|
||||
|
@ -320,18 +329,33 @@ public class MultiDocValues {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a segment number and segment ordinal, returns
|
||||
* the corresponding global ordinal.
|
||||
*/
|
||||
public long getGlobalOrd(int subIndex, long segmentOrd) {
|
||||
return segmentOrd + ordDeltas[subIndex].get(segmentOrd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a segment number and global ordinal, returns
|
||||
* the corresponding segment ordinal.
|
||||
*/
|
||||
public long getSegmentOrd(int subIndex, long globalOrd) {
|
||||
return globalOrd - globalOrdDeltas.get(globalOrd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a global ordinal, returns the index of the first
|
||||
* sub that contains this term.
|
||||
*/
|
||||
public int getSegmentNumber(long globalOrd) {
|
||||
return (int) subIndexes.get(globalOrd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of unique terms in global ord space.
|
||||
*/
|
||||
public long getValueCount() {
|
||||
return globalOrdDeltas.size();
|
||||
}
|
||||
|
|
|
@ -33,6 +33,9 @@ public abstract class SortedSetDocValues {
|
|||
* constructors, typically implicit.) */
|
||||
protected SortedSetDocValues() {}
|
||||
|
||||
/** When returned by {@link #nextOrd()} it means there are no more
|
||||
* ordinals for the document.
|
||||
*/
|
||||
public static final long NO_MORE_ORDS = -1;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue