# Simple query DSL with Scalastic

**URL:** <https://discuss.elastic.co/t/simple-query-dsl-with-scalastic/10689>\
**Category:** Elasticsearch\
**Created:** [February 11, 2013, 10:09am UTC](https://discuss.elastic.co/t/simple-query-dsl-with-scalastic/10689 "2013-02-11T10:09:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![didier\_baquier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/didier_baquier/32/2055_2.png) [@didier\_baquier](https://discuss.elastic.co/u/didier_baquier)\
**Post date:** [February 11, 2013, 10:09am UTC](https://discuss.elastic.co/t/simple-query-dsl-with-scalastic/10689/1 "2013-02-11T10:09:01Z")

</div>

Hi everyone,

I'm starting with Scalastic but I didn't figure out how can I use the query  
DSL.

Could you please tell me what I'm doing wrong with this code ? (assuming  
that indexer.search() works fine) :  
import org.elasticsearch.\_  
import scalastic.elasticsearch.\_  
object main extends App {  
val indexer = Indexer.transport(Map("cluster.name" -\> "elasticsearch"))  
val response = indexer.search(query = boolQuery.must(termQuery(  
"user.screen\_name", "xxxx")))  
println(response)  
}  
\*  
\*

I got this error :  
scala: not found: value boolQuery  
Error occurred in an application involving default arguments.  
val response = indexer.search(query = boolQuery.must(termQuery(  
"user.screen\_name", "xxxx")))  
\*  
\*  
\*  
\*  
Thanks in advance for your precious help!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:52am UTC](https://discuss.elastic.co/t/simple-query-dsl-with-scalastic/10689/2 "2017-07-06T02:52:10Z")

</div>


