I am practicing with the java api for elasticsearch and have a question for scroll api.
According to the online document, SearchType.SCAN should be defined for for setSearchType.
SearchResponse scrollResp = client.prepareSearch(test)
.setSize(100).execute().actionGet(); //100 hits per shard will be returned for each scroll
However, according to the search type page, SearchType SCAN is deprecated from v 2.1.0.
I have checked the code and SCAN is not included in the enum.
This file has been truncated.
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
So, should I keep using the search type SCAN when I use the scroll api? If not , I appreciate if someone can educate me how to call the SearchResponse object for scroll api in correct way.