Grouped flights

Group search - in fact is a selection of common elements from different results and assigning connections on which it is possible to collect flights between them. Analogical to the normalization procedure in relational databases.

Within the grouping of flights, the following structural elements were singled out:

  • AirItinerary - information about air itinerary between a certain pair of airports provided by a certain airline.
  • FlightSegment - information about a certain flight on a certain itinerary. For one itinerary there can be several segments (for example, an airplane with the same flight flying several times a day).
  • Price (GroupedPrice) - information about the price of a certain set of itineraries.
  • Flight (FlightPriceGroup) - the link between a certain set of segments is a de facto flight along a certain itinerary (including a composite one), and one or more prices that apply to this flight.
<?xml version="1.0"?>
<s:Envelope xmlns:s="">
    <Search_1_2Response xmlns="">
      <Search_1_2Result xmlns:a="" xmlns:i="">
          <SearchData />

For successful parsing of the response it is required to compare the elements in different groups by their identifiers (ID)

To optimize your group search handler, it is recommended to carry out the go-round of elements in 2 steps. At first you bypass all the elements of each group and index them by the specified value in the ID field. And that, once you bypass flights FlightPriceGroup and fill them with data on segments and prices by selecting data from the index. For indexing, you can use the hash tables of your programming language.