best approach to pull back only relevant fields

2015-01-05 Thread phil swenson
If I have a document I’m storing that looks like this:

doc = {


  userId: *‘*yoyomamma',
  physicians: [{
name: "sanjay gupta",
id: 403494
  },
{
  name: "daniel litvak",
  id: 3382
}],
  procedures: [{
name: "appendectomy",
id: 3939,
date: "2/3/2012"
  }

… etc a bunch of other stuff

}

When I search on “appendectomy” I want to only return the following:
“userId” and the matching  “procedures” fields…..


Any thoughts on the best approach to do this?


thanks

phil

-- 
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/CAGenvhVDwZdS8519af5RWisrEVVUbeOi55%2BUdGZNK55mwsLzNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: javascript es client - should es clients be pooled?

2014-12-29 Thread phil swenson
thanks jack, let me know how your testing goes!

On Fri, Dec 26, 2014 at 11:57 AM, Jack Park 
wrote:

> On my platform, there is one and only one es client, through which all
> requests go. It seems to work well, though "well" is defined as having just
> a few people using it at one time. We plan to start stress testing the
> system soon.
>
> Cheers
> Jack
>
> On Fri, Dec 26, 2014 at 9:55 AM, phil swenson 
> wrote:
>
>> no answer, so let me ask a different way.  how are most of the es
>> javascript client apps managing the instance of the client?
>>
>> do you have one es client per app (singleton) that all requests go
>> through?  Do you create and destroy clients for every request?  Do you use
>> a es client pool using something like
>> https://github.com/coopernurse/node-pool ?
>>
>> Thanks for any comments!
>>
>> phil
>>
>> On Wed, Dec 24, 2014 at 10:34 AM, Phil Swenson 
>> wrote:
>>
>>> I'm writing a node/es app using the es javascript api
>>>
>>> Is there any reason to use pooling for all the javascript clients?  Or
>>> should I just use one client for the app?
>>>
>>> Thanks,
>>> phil
>>>
>>> --
>>> 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/a44a6a6e-8763-44f5-9e2d-8ea52dcf0345%40googlegroups.com
>>> <https://groups.google.com/d/msgid/elasticsearch/a44a6a6e-8763-44f5-9e2d-8ea52dcf0345%40googlegroups.com?utm_medium=email&utm_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/CAGenvhVYD-fRkrVx5j0XR_xNYM2eSFFFxh2TxJnEar-HEWVfSg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/elasticsearch/CAGenvhVYD-fRkrVx5j0XR_xNYM2eSFFFxh2TxJnEar-HEWVfSg%40mail.gmail.com?utm_medium=email&utm_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/CAH6s0fyEhW5b-BXCYViAb7Ej4XNC5shjjVE_kYfPKOcx6H-dng%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAH6s0fyEhW5b-BXCYViAb7Ej4XNC5shjjVE_kYfPKOcx6H-dng%40mail.gmail.com?utm_medium=email&utm_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/CAGenvhX4Gk80WG%3D33QzTzpDL-PDQ4eOm4JZZkToG1sXCY_bVfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: javascript es client - should es clients be pooled?

2014-12-26 Thread phil swenson
no answer, so let me ask a different way.  how are most of the es
javascript client apps managing the instance of the client?

do you have one es client per app (singleton) that all requests go
through?  Do you create and destroy clients for every request?  Do you use
a es client pool using something like
https://github.com/coopernurse/node-pool ?

Thanks for any comments!

phil

On Wed, Dec 24, 2014 at 10:34 AM, Phil Swenson 
wrote:

> I'm writing a node/es app using the es javascript api
>
> Is there any reason to use pooling for all the javascript clients?  Or
> should I just use one client for the app?
>
> Thanks,
> phil
>
> --
> 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/a44a6a6e-8763-44f5-9e2d-8ea52dcf0345%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/a44a6a6e-8763-44f5-9e2d-8ea52dcf0345%40googlegroups.com?utm_medium=email&utm_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/CAGenvhVYD-fRkrVx5j0XR_xNYM2eSFFFxh2TxJnEar-HEWVfSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


javascript es client - should es clients be pooled?

2014-12-24 Thread Phil Swenson
I'm writing a node/es app using the es javascript api

Is there any reason to use pooling for all the javascript clients?  Or 
should I just use one client for the app?

Thanks,
phil

-- 
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/a44a6a6e-8763-44f5-9e2d-8ea52dcf0345%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Are rivers still being deprecated?

2014-12-10 Thread Phil Swenson
did you ever find an answer to this question?



On Thursday, November 6, 2014 7:17:36 PM UTC-7, Alexandre Rafalovitch wrote:
>
> ElasticSearch 1.4 is out and I can't see any mentions that Rivers are 
> deprecated. 
>
> Has that (informal) decision been reversed? Or was the timeline 
> further out? What's the currently recommended approach? 
>
> Regards, 
>Alex. 
>

-- 
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/d7638967-0cbc-4ab7-b2ce-2646116423c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.