# Java API doc issues: Search

**URL:** <https://discuss.elastic.co/t/java-api-doc-issues-search/3084>\
**Category:** Elasticsearch\
**Created:** [July 9, 2010, 1:22pm UTC](https://discuss.elastic.co/t/java-api-doc-issues-search/3084 "2010-07-09T13:22:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![larrry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larrry/32/18733_2.png) [@larrry](https://discuss.elastic.co/u/larrry)\
**Post date:** [July 9, 2010, 1:22pm UTC](https://discuss.elastic.co/t/java-api-doc-issues-search/3084/1 "2010-07-09T13:22:38Z")

</div>

When I use the code provided in the search API docs, there are a couple minor issues.

The code is missing a qualifier for the constant DFS\_QUERY\_THEN\_FETCH. I changed it to SearchType.DFS\_QUERY\_THEN\_FETCH and it's fine.

The code is missing a closing parenthesis, apparently before .actionGet().

The original code snippet is below:

SearchResponse response = client.search(searchRequest("test")  
.searchType(DFS\_QUERY\_THEN\_FETCH)  
.source(searchSource()  
.query(termQuery("multi", "test"))  
.from(0).size(60).explain(true))  
.actionGet();

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:22am UTC](https://discuss.elastic.co/t/java-api-doc-issues-search/3084/2 "2017-07-06T04:22:28Z")

</div>

Closed on July 6, 2017, 4:22am UTC


