Exemplo n.º 1
0
 protected bool Equals(IndexFieldOptions other)
 {
     return(Storage == other.Storage &&
            Indexing == other.Indexing &&
            TermVector == other.TermVector &&
            Equals(Spatial, other.Spatial) &&
            string.Equals(Analyzer, other.Analyzer, StringComparison.OrdinalIgnoreCase) &&
            Suggestions == other.Suggestions);
 }
Exemplo n.º 2
0
        private void ApplyValues<TValue>(IndexDefinition indexDefinition, IDictionary<string, TValue> values, Action<IndexFieldOptions, TValue> action)
        {
            foreach (var kvp in values)
            {
                IndexFieldOptions field;
                if (indexDefinition.Fields.TryGetValue(kvp.Key, out field) == false)
                    indexDefinition.Fields[kvp.Key] = field = new IndexFieldOptions();

                action(field, kvp.Value);
            }
        }