Inheritance: Lucene.Net.Search.DocIdSet
Exemple #1
0
        public void Process(IndexReader indexReader,
                            string readerName,
                            int perSegmentDocumentNumber,
                            int perIndexDocumentNumber,
                            Document document,
                            string id,
                            NuGetVersion version)
        {
            HashSet <string> registrationOwners;

            if (id != null && _owners.TryGetValue(id, out registrationOwners))
            {
                foreach (string registrationOwner in registrationOwners)
                {
                    _knownOwners.Add(registrationOwner);

                    DynamicDocIdSet ownerDocIdSet;
                    if (_ownerTuples[readerName].TryGetValue(registrationOwner, out ownerDocIdSet))
                    {
                        ownerDocIdSet.DocIds.Add(perSegmentDocumentNumber);
                    }
                    else
                    {
                        ownerDocIdSet = new DynamicDocIdSet();
                        ownerDocIdSet.DocIds.Add(perSegmentDocumentNumber);

                        _ownerTuples[readerName].Add(registrationOwner, ownerDocIdSet);
                    }
                }
            }
        }
        public void Process(IndexReader indexReader,
            string readerName,
            int perSegmentDocumentNumber,
            int perIndexDocumentNumber,
            Document document,
            string id,
            NuGetVersion version)
        {
            HashSet<string> registrationOwners;

            if (id != null && _owners.TryGetValue(id, out registrationOwners))
            {
                foreach (string registrationOwner in registrationOwners)
                {
                    _knownOwners.Add(registrationOwner);

                    DynamicDocIdSet ownerDocIdSet;
                    if (_ownerTuples[readerName].TryGetValue(registrationOwner, out ownerDocIdSet))
                    {
                        ownerDocIdSet.DocIds.Add(perSegmentDocumentNumber);
                    }
                    else
                    {
                        ownerDocIdSet = new DynamicDocIdSet();
                        ownerDocIdSet.DocIds.Add(perSegmentDocumentNumber);

                        _ownerTuples[readerName].Add(registrationOwner, ownerDocIdSet);
                    }
                }
            }
        }