Re: Testing for an Empty String With the Following

2014-04-21 Thread Alexander Reelsen
Hey,

not sure if you really want to test for an empty string, or maybe for an
empty field? There is a missing filter which you could potentially use for
that, see
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-missing-filter.html#query-dsl-missing-filter


--Alex


On Fri, Apr 18, 2014 at 11:58 PM, Paul paulj3...@gmail.com wrote:

 Hi,

 Thanks for everyone's patience while I learn the elasticsearch query DSL.
  I'm trying to get used to its verbosity.


 How would I do a query like this, again in SQL parlance:  select col1 from
 mysource where col2 =  and col3 in [, one, two] and col4 = foo

 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/elasticsearch/cbf00b67-b354-4087-a937-450055fce661%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/cbf00b67-b354-4087-a937-450055fce661%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8_dVB3-16aK8rHv3cAF%2BNYBzCiK6RxVdzmUqQPLjFDeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing for an Empty String

2014-04-19 Thread Clinton Gormley
Hi Paul

You need to use a missing filter:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-missing-filter.html#query-dsl-missing-filter

You can read the section of the guide about Dealing with null values
here:
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_dealing_with_null_values.html#_dealing_with_null_values

clint


On 18 April 2014 22:24, Paul paulj3...@gmail.com wrote:

 Hi,

 Thanks for everyone's patience while I learn the elasticsearch query DSL.
  I'm trying to get used to its verbosity.


 How would I do a query like this, again in SQL parlance:  select col1 from
 mysource where col2 = ?

  --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/elasticsearch/6b614d6f-cb0f-4bad-9a64-f787bd0deb29%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/6b614d6f-cb0f-4bad-9a64-f787bd0deb29%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKQV%3DtWKXRNEOC44a-v%3DmEzHUhyu1BQ2WfE4%2BcsRDQ88Mw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Testing for an Empty String

2014-04-18 Thread Paul
Hi,

Thanks for everyone's patience while I learn the elasticsearch query DSL. 
 I'm trying to get used to its verbosity.


How would I do a query like this, again in SQL parlance:  select col1 from 
mysource where col2 = ?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/6b614d6f-cb0f-4bad-9a64-f787bd0deb29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Testing for an Empty String With the Following

2014-04-18 Thread Paul
Hi,

Thanks for everyone's patience while I learn the elasticsearch query DSL. 
 I'm trying to get used to its verbosity.


How would I do a query like this, again in SQL parlance:  select col1 from 
mysource where col2 =  and col3 in [, one, two] and col4 = foo

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/cbf00b67-b354-4087-a937-450055fce661%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.