Quantcast

Support for indexing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Support for indexing

Yann Barraud
Hi chaps,

I'm currently thinking about indexing a Client File. The DB contains various things, structured the following way :
- clients owning contracts,
- events occurring on those contracts.

the searches I wish to execute are :
- Find a client, its contracts and the events on this contract
- Find a contract, and its events (an a link to the owner)
- Find an event (and a link to the contract involved).

How should I map this structure ? Should I use nested docs ?

Thanks for your help.

Regards,
Yann

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for indexing

Radu Gheorghe-2
Hello Yann,

Yes, you can use nested docs, or you can break clients, contracts and events into different types and make clients the _parent of contracts, and contracts _parent of events.

This would let you index and update different documents independently, as opposed to nested documents where you have to reindex the whole structured. But there are disdvantages on the search side: has_child query is slower than the equivalent nested query, and you'd have to hit ES again to get the child.

Best regards,
Radu
--
http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Thu, Feb 14, 2013 at 11:59 AM, Yann Barraud <[hidden email]> wrote:
Hi chaps,

I'm currently thinking about indexing a Client File. The DB contains various things, structured the following way :
- clients owning contracts,
- events occurring on those contracts.

the searches I wish to execute are :
- Find a client, its contracts and the events on this contract
- Find a contract, and its events (an a link to the owner)
- Find an event (and a link to the contract involved).

How should I map this structure ? Should I use nested docs ?

Thanks for your help.

Regards,
Yann

--
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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for indexing

Yann Barraud
Hi Radu,

Thanks for this answer. I'll investigate the 2 options, depending on how we want to search items.

Kind regards,
Yann

Le dimanche 17 février 2013 13:14:55 UTC+1, Radu Gheorghe a écrit :
Hello Yann,

Yes, you can use nested docs, or you can break clients, contracts and events into different types and make clients the _parent of contracts, and contracts _parent of events.

This would let you index and update different documents independently, as opposed to nested documents where you have to reindex the whole structured. But there are disdvantages on the search side: has_child query is slower than the equivalent nested query, and you'd have to hit ES again to get the child.

Best regards,
Radu
--
http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Thu, Feb 14, 2013 at 11:59 AM, Yann Barraud <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="VPcUQCyiqi8J">yann.b...@...> wrote:
Hi chaps,

I'm currently thinking about indexing a Client File. The DB contains various things, structured the following way :
- clients owning contracts,
- events occurring on those contracts.

the searches I wish to execute are :
- Find a client, its contracts and the events on this contract
- Find a contract, and its events (an a link to the owner)
- Find an event (and a link to the contract involved).

How should I map this structure ? Should I use nested docs ?

Thanks for your help.

Regards,
Yann

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="VPcUQCyiqi8J">elasticsearc...@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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Loading...