I forgot to mention, I need the ability for the user to specify they only 
care about keys for the entity.type === 'person' (or any type for that 
matter).

On Tuesday, March 4, 2014 11:13:27 PM UTC-5, Corey Nolet wrote:
>
> Hello,
>
> I've got an "entity" document which looks like this:
>
> {
>    id: 'id',
>    type: 'person',
>    tuples: [
>        {
>             key: 'nameFirst',
>             value: 'john',
>             type: 'string'
>         },
>             key: 'age',
>             value: '38',
>             type: 'int'
>         },
>         {
>             key: 'nameLast',
>             value: 'doe',
>         }       
>     ]
> }
>
> The tuples field has been mapped in ElasticSearch as a nested type where I 
> provide both analyzed and not_analyzed indices for each of the nested 
> fields (for exact and fuzzy match). What I'm trying to do is find, for each 
> entity's type field, the unique tuple key values along with their 
> associated types.
>
> In other words, I want to write a web service where someone can start 
> typing "n" and I'll return "[{ key:'nameFirst', type:'string'}, { key: 
> 'nameLast', type: 'string' }]" or they could start typing "a" and I'll 
> return "[{ key: 'age', type: 'int' }]. If they don't type anything, I'd 
> like to return the union between the two sets (where it includes nameLast, 
> nameFirst, and age). 
>
> As i'm reading, I'm seeing that this may be done with facets but I know 
> they have some limitations  Is this something that would be possible to do 
> directly? I'm trying to do this all with one fast query if I can.
>

-- 
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/5c62e98d-3ad9-4a4f-b7c7-5620221c2380%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to