Exemplo n.º 1
0
    def test_es_query_allows_query_in_dict(self):
        ed_flights = self.ed_flights()

        left = ed_flights.es_query({"match": {"OriginCityName": "Rome"}})
        right = ed_flights.es_query({"query": {"match": {"OriginCityName": "Rome"}}})

        assert len(left) > 0
        assert_eland_frame_equal(left, right)
Exemplo n.º 2
0
    def test_flights_match_query(self):
        ed_flights = self.ed_flights()

        left = ed_flights.es_query({"match": {"OriginCityName": "Rome"}})[
            ed_flights["Carrier"] == "Kibana Airlines"
        ]

        right = ed_flights[ed_flights["Carrier"] == "Kibana Airlines"].es_query(
            {"match": {"OriginCityName": "Rome"}}
        )

        assert len(left) > 0
        assert_eland_frame_equal(left, right)