Пример #1
0
        //private HandleSuggestions _handleSuggestions;

        protected MapIndex(MapIndexDefinition definition, StaticIndexBase compiled)
            : base(definition.IndexDefinition.Type, definition)
        {
            _compiled = compiled;

            foreach (var field in definition.IndexDefinition.Fields)
            {
                var suggestionOption = field.Value.Suggestions;
                if (suggestionOption.HasValue && suggestionOption.Value)
                {
                    _suggestionsActive.Add(field.Key);
                }
            }

            if (_compiled.ReferencedCollections == null)
            {
                return;
            }

            foreach (var collection in _compiled.ReferencedCollections)
            {
                foreach (var referencedCollection in collection.Value)
                {
                    _referencedCollections.Add(referencedCollection.Name);
                }
            }
        }
Пример #2
0
        private MapIndex(int indexId, MapIndexDefinition definition, StaticIndexBase compiled)
            : base(indexId, IndexType.Map, definition)
        {
            _compiled = compiled;

            if (_compiled.ReferencedCollections == null)
            {
                return;
            }

            foreach (var collection in _compiled.ReferencedCollections)
            {
                foreach (var referencedCollection in collection.Value)
                {
                    _referencedCollections.Add(referencedCollection.Name);
                }
            }
        }