Lucene.Net.Index.AtomicReader.GetSortedDocValues C# (CSharp) Method

GetSortedDocValues() public abstract method

Returns SortedDocValues for this field, or null if no SortedDocValues were indexed for this field. The returned instance should only be used by a single thread.
public abstract GetSortedDocValues ( string field ) : Lucene.Net.Index.SortedDocValues
field string
return Lucene.Net.Index.SortedDocValues
        public abstract SortedDocValues GetSortedDocValues(string field);

Usage Example

            public override void Run()
            {
                SortedDocValues  stringDVDirect;
                NumericDocValues docIDToID;

                try
                {
                    stringDVDirect = sr.GetSortedDocValues("stringdv");
                    docIDToID      = sr.GetNumericDocValues("id");
                    Assert.IsNotNull(stringDVDirect);
                }
                catch (IOException ioe)
                {
                    throw new Exception(ioe.ToString(), ioe);
                }
                while (Environment.TickCount < endTime)
                {
                    SortedDocValues source;
                    source = stringDVDirect;
                    BytesRef scratch = new BytesRef();

                    for (int iter = 0; iter < 100; iter++)
                    {
                        int docID = random.Next(sr.MaxDoc);
                        source.Get(docID, scratch);
                        Assert.AreEqual(docValues[(int)docIDToID.Get(docID)], scratch);
                    }
                }
            }
All Usage Examples Of Lucene.Net.Index.AtomicReader::GetSortedDocValues