# Full text search with field="somevalue"

**URL:** <https://discuss.elastic.co/t/full-text-search-with-field-somevalue/9515>\
**Category:** Elasticsearch\
**Created:** [November 1, 2012, 9:47am UTC](https://discuss.elastic.co/t/full-text-search-with-field-somevalue/9515 "2012-11-01T09:47:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhushan15](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@bhushan15](https://discuss.elastic.co/u/bhushan15)\
**Post date:** [November 1, 2012, 9:47am UTC](https://discuss.elastic.co/t/full-text-search-with-field-somevalue/9515/1 "2012-11-01T09:47:29Z")

</div>

Hi,

I am using match query for full text search.I am having one property as "collectionType". I want full text search with keyword say "FRANKLIN" but collectionType="HUMAN"

Node node = NodeBuilder.nodeBuilder().node();  
Client client = node.client();  
//FilteredQuery q= new FilteredQuery(QueryBuilders.matchAllQuery(), AndFilter());  
SearchResponse response = client.prepareSearch("my\_index")  
.setSearchType(SearchType.DFS\_QUERY\_THEN\_FETCH)  
.setTypes("couchbaseDocument")  
.setQuery(QueryBuilders.matchQuery("\_all", "FRANKLIN"))  
.execute()  
.actionGet();

for (SearchHit hit : response.getHits()) {  
System.out.println("Id " + hit.getId() + " Index " + hit.getIndex() + " Type " +  
hit.getType() + hit.getSourceAsString());  
}

---

<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, 3:06am UTC](https://discuss.elastic.co/t/full-text-search-with-field-somevalue/9515/2 "2017-07-06T03:06:36Z")

</div>

Closed on July 6, 2017, 3:06am UTC


