예제 #1
0
            public override int GetOrd(int docID)
            {
                @in.SetDocument(docID);
                int count = @in.Cardinality();

                if (count == 0)
                {
                    return(-1);
                }
                else
                {
                    return((int)@in.OrdAt(count.TripleShift(1)));
                }
            }
예제 #2
0
            public override int GetOrd(int docID)
            {
                @in.SetDocument(docID);
                int count = @in.Cardinality();

                if (count == 0)
                {
                    return(-1);
                }
                else
                {
                    return((int)@in.OrdAt((int)((uint)(count - 1)) >> 1));
                }
            }