func makeBetween(lhs *gentypes.FieldType, lower, upper interface{}) (interface{}, error) {
	/*
		"nested": {
			"filter": {
			    "and": [
			        {
			            "term": {
			                "k": "open"
			            }
			        },
			        {
			            "range": {
			                "f": {"gt": 7}
			            }
			        },
			        {
			            "range": {
			                "f": {"lt": 15}
			            }
			        }
			    ]
			},
			"path": "map_events"
		}

		"and": [
		    {
		        "range": {
		            "f": {"gt": 7}
		        }
		    },
		    {
		        "range": {
		            "f": {"lt": 15}
		        }
		    }
		]
	*/

	lr := &RangeFilter{Range: map[string]RangeQry{lhs.Field: {GT: lower}}}
	ur := &RangeFilter{Range: map[string]RangeQry{lhs.Field: {LT: upper}}}
	fl := []interface{}{lr, ur}

	if lhs.Nested() {
		fl = append(fl, Term("k", lhs.Field))
		return &nested{&NestedFilter{
			Filter: &and{fl},
			Path:   lhs.Path,
		}}, nil
	}
	return &and{fl}, nil
}
// makeBetween returns a range filter for Elasticsearch given the 3 nodes that
// make up a comparison.
makeBetween returns a range filter for Elasticsearch given the 3 nodes that
make up a comparison.
// makeBetween returns a range filter for Elasticsearch given the 3 nodes that // make up a comparison .
func makeBetween(lhs *gentypes.FieldType, lower, upper interface{}) (interface{}, error) {
	lr := &RangeFilter{Range: map[string]RangeQry{lhs.Field: {GT: lower}}}
	ur := &RangeFilter{Range: map[string]RangeQry{lhs.Field: {LT: upper}}}
	fl := []interface{}{lr, ur}
	if lhs.Nested() {
		fl = append(fl, Term("k", lhs.Field))
		return &nested{&NestedFilter{
			Filter: &and{fl},
			Path:   lhs.Path,
		}}, nil
	}
	return &and{fl}, nil
}
func makeBetween ( lhs * gentypes . FieldType , lower , upper interface { } ) ( interface { } , error ) { lr := & RangeFilter { Range : map [ string ] RangeQry { lhs . Field : { GT : lower } } } ur := & RangeFilter { Range : map [ string ] RangeQry { lhs . Field : { LT : upper } } } fl := [ ] interface { } { lr , ur } if lhs . Nested ( ) { fl = append ( fl , Term ( " " , lhs . Field ) ) return & nested { & NestedFilter { Filter : & and { fl } , Path : lhs . Path , } } , nil } return & and { fl } , nil }
makeBetween returns a range filter for Elasticsearch given the 3 nodes that
make up a comparison.
makeBetween returns a range filter for Elasticsearch given the 3 nodes that make up a comparison .
/*
		"nested": {
			"filter": {
			    "and": [
			        {
			            "term": {
			                "k": "open"
			            }
			        },
			        {
			            "range": {
			                "f": {"gt": 7}
			            }
			        },
			        {
			            "range": {
			                "f": {"lt": 15}
			            }
			        }
			    ]
			},
			"path": "map_events"
		}

		"and": [
		    {
		        "range": {
		            "f": {"gt": 7}
		        }
		    },
		    {
		        "range": {
		            "f": {"lt": 15}
		        }
		    }
		]
	*/