private static IEnumerable<Query> Split(IEnumerable<Range> parts, string prefix)
        {
            var currentPart = parts.First();
            var remainingParts = parts.Skip(1);

            if(remainingParts.Any())
            {
                var lowerEdgeQuery = GetLowerEdgeQuery(prefix, remainingParts);
                var upperEdgeQuery = GetUpperEdgeQuery(prefix, remainingParts);

                if (lowerEdgeQuery.Any() || upperEdgeQuery.Any() || !currentPart.IsFloorValue || !currentPart.IsCeilingValue)
                {
                    var query = new BooleanQuery();

                    var midRangeStart = currentPart.Value(currentPart.Start);
                    var midRangeEnd = currentPart.Value(currentPart.End);

                    if (lowerEdgeQuery.Any())
                    {
                        midRangeStart = currentPart.Value(currentPart.Start + 1);
                        query.AddClause(GetCombinedTermAndSplitQuery(prefix, lowerEdgeQuery, currentPart), BooleanClause.Occur.SHOULD);
                    }

                    if (upperEdgeQuery.Any())
                    {
                        midRangeEnd = currentPart.Value(currentPart.End - 1);
                        query.AddClause(GetCombinedTermAndSplitQuery(prefix, upperEdgeQuery, currentPart), BooleanClause.Occur.SHOULD);
                    }

                    if (currentPart.End - currentPart.Start > 1)
                    {
                        query.AddRangeQuery(currentPart.Name(prefix), midRangeStart, midRangeEnd, BooleanClause.Occur.SHOULD);
                    }

                    yield return query;
                }
            }
            else
            {
                if (!currentPart.IsFloorValue || !currentPart.IsCeilingValue)
                {
                    yield return
                        new RangeQuery(
                            new Term(currentPart.Name(prefix), currentPart.Value(currentPart.Start)),
                            new Term(currentPart.Name(prefix), currentPart.Value(currentPart.End)),
                            true);
                }
            }
        }