Skip to content

Difference in request url when use scroll #1713

Closed
@zabykrinich

Description

@zabykrinich

I have ES 2.1 and builded nest from Master branch (as far as I understand alpha is located there). When I try to make search I see following problem:
Code
var resultScan = m_client.Search<T>(s => s
.From(0)
.Size(1)
.Index(index)
.Query(q => q.MatchAll())
.SearchType(Elasticsearch.Net.SearchType.Scan)
.Scroll(TimeSpan.FromSeconds(2)));

Gives following url : .../_search?search_type=scan&scroll=2s

SearchRequest<T> reqScan = new SearchRequest<T>(index)
{
From = 0,
Size = 1,
Query = new MatchAllQuery(),
SearchType = Elasticsearch.Net.SearchType.Scan,
Scroll = TimeSpan.FromSeconds(2)
};

var resultScan = m_client.Search<T>(reqScan);

Gives following url : ...//_search?search_type=scan&scroll=00:00:02

In last case I get BadRequest(400) from server.

May be the problem is fixed on 2.0 branch, but unfortunately I can't make tests there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions