Build document by query

Hi,

in order to use the "terms filter" effectively I have to generate a new
document with the return values of a query. More specifically I would like
to get a list of ids (not eleasticsearch document ids) and use those ids as
a terms filter.

Cheers
Valentin

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Valentin,

Can you please elaborate? Not sure you are missing.

Cheers,
Boaz

On Tuesday, May 21, 2013 3:33:16 PM UTC+2, Valentin wrote:

Hi,

in order to use the "terms filter" effectively I have to generate a new
document with the return values of a query. More specifically I would like
to get a list of ids (not eleasticsearch document ids) and use those ids as
a terms filter.

Cheers
Valentin

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

I use elasticsearch as a storage for a usage logfile. A simple version of
my documents look like this
{ timestamp: 231653172, userid: '123', url: 'http://1' }
{ timestamp: 236232844, userid: '456', url: 'http://2' }
...

Now I want to get a list of many userids (eg all userids where url =
'http://1') and then use this list of userids to get a timeline of all
pages those users opened.

As I understand it, a new feature of 0.90 is to store those userids in a
single document in a (secondary) index an then use the ids provided in that
document to query my primary index.

Cheers,
Valentin

On Wednesday, May 22, 2013 3:10:21 PM UTC+2, Boaz Leskes wrote:

Hi Valentin,

Can you please elaborate? Not sure you are missing.

Cheers,
Boaz

On Tuesday, May 21, 2013 3:33:16 PM UTC+2, Valentin wrote:

Hi,

in order to use the "terms filter" effectively I have to generate a new
document with the return values of a query. More specifically I would like
to get a list of ids (not eleasticsearch document ids) and use those ids as
a terms filter.

Cheers
Valentin

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

You'd have to do this in two steps:

  1. query to get the ids
  2. query using the ids

clint

On 22 May 2013 17:04, Valentin pletzer@gmail.com wrote:

I use elasticsearch as a storage for a usage logfile. A simple version of
my documents look like this
{ timestamp: 231653172, userid: '123', url: 'http://1' }
{ timestamp: 236232844, userid: '456', url: 'http://2' }
...

Now I want to get a list of many userids (eg all userids where url = '
http://1') and then use this list of userids to get a timeline of all
pages those users opened.

As I understand it, a new feature of 0.90 is to store those userids in a
single document in a (secondary) index an then use the ids provided in that
document to query my primary index.

Cheers,
Valentin

On Wednesday, May 22, 2013 3:10:21 PM UTC+2, Boaz Leskes wrote:

Hi Valentin,

Can you please elaborate? Not sure you are missing.

Cheers,
Boaz

On Tuesday, May 21, 2013 3:33:16 PM UTC+2, Valentin wrote:

Hi,

in order to use the "terms filter" effectively I have to generate a new
document with the return values of a query. More specifically I would like
to get a list of ids (not eleasticsearch document ids) and use those ids as
a terms filter.

Cheers
Valentin

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Clint,

thanks I guessed as much. I was hoping for a single query (server side)
option in order to save one network roundtrip.

Valentin

On Thursday, May 23, 2013 12:35:58 PM UTC+2, Clinton Gormley wrote:

You'd have to do this in two steps:

  1. query to get the ids
  2. query using the ids

clint

On 22 May 2013 17:04, Valentin <ple...@gmail.com <javascript:>> wrote:

I use elasticsearch as a storage for a usage logfile. A simple version of
my documents look like this
{ timestamp: 231653172, userid: '123', url: 'http://1' }
{ timestamp: 236232844, userid: '456', url: 'http://2' }
...

Now I want to get a list of many userids (eg all userids where url = '
http://1') and then use this list of userids to get a timeline of all
pages those users opened.

As I understand it, a new feature of 0.90 is to store those userids in a
single document in a (secondary) index an then use the ids provided in that
document to query my primary index.

Cheers,
Valentin

On Wednesday, May 22, 2013 3:10:21 PM UTC+2, Boaz Leskes wrote:

Hi Valentin,

Can you please elaborate? Not sure you are missing.

Cheers,
Boaz

On Tuesday, May 21, 2013 3:33:16 PM UTC+2, Valentin wrote:

Hi,

in order to use the "terms filter" effectively I have to generate a new
document with the return values of a query. More specifically I would like
to get a list of ids (not eleasticsearch document ids) and use those ids as
a terms filter.

Cheers
Valentin

--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.