Beispiel #1
0
        internal void BuildString(JsonTextWriter writer)
        {
            writer.WritePropertyName("must_not");
            writer.WriteStartArray();

            if (_term != null)
            {
                _term.BuildString(writer);
            }

            if (_match != null)
            {
                _match.BuildString(writer);
            }

            if (_text != null)
            {
                _text.BuildString(writer);
            }

            if (_prefix != null)
            {
                _prefix.BuildString(writer);
            }

            if (_wildcard != null)
            {
                _wildcard.BuildString(writer);
            }

            writer.WriteEndArray();
        }
Beispiel #2
0
        internal void BuildString(JsonTextWriter writer)
        {
            writer.WritePropertyName("should");

            writer.WriteStartArray();
            if (_term != null)
            {
                _term.BuildString(writer);
            }

            if (_match != null)
            {
                _match.BuildString(writer);
            }

            if (_text != null)
            {
                _text.BuildString(writer);
            }

            if (_prefix != null)
            {
                _prefix.BuildString(writer);
            }

            if (_wildcard != null)
            {
                _wildcard.BuildString(writer);
            }

            if (_boolfiterList != null && _boolfiterList.Count > 0)
            {
                foreach (var boofiter in _boolfiterList)
                {
                    writer.WriteStartObject();
                    boofiter.BuildString(writer);
                    writer.WriteEndObject();
                }
            }

            writer.WriteEndArray();
        }