Different routing configs in a single query?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Different routing configs in a single query?

ppearcy
Hi All!
  I have a single query that spans over a set of per client private data using routing, as well as, a global dataset with no routing. 

I would like to combine this into a single query, but end up needing to set different routing values per index, eg the private index has the clientid routing value and the global index does not have a routing value. 

Is this currently possible? If not, any issues if I open a feature request? 

My current workaround is to simply run two queries and merge those results. This approach doesn't work great with relevancy since the scores are computed in isolation and also make pagination painful. 

Thanks!
Paul

--
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
|

Re: Different routing configs in a single query?

dadoonet
Hi Paul,


In that case, why do you specify routing value? If you don't set it when querying then all shards will be queried.

Could you elaborate a bit more?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 nov. 2013 à 20:06, ppearcy <[hidden email]> a écrit :

Hi All!
  I have a single query that spans over a set of per client private data using routing, as well as, a global dataset with no routing. 

I would like to combine this into a single query, but end up needing to set different routing values per index, eg the private index has the clientid routing value and the global index does not have a routing value. 

Is this currently possible? If not, any issues if I open a feature request? 

My current workaround is to simply run two queries and merge those results. This approach doesn't work great with relevancy since the scores are computed in isolation and also make pagination painful. 

Thanks!
Paul

--
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
|

Re: Different routing configs in a single query?

ppearcy
Hi David, 
  I don't want to span all shards for the private index (so I use per client routing here), while I do for the global one (so, no routing specified here). 

Thanks!

On Monday, November 25, 2013 2:25:19 PM UTC-5, David Pilato wrote:
Hi Paul,


In that case, why do you specify routing value? If you don't set it when querying then all shards will be queried.

Could you elaborate a bit more?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 nov. 2013 à 20:06, ppearcy <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="XHGxsKkLpPkJ" _originalhref="javascript:">ppe...@...> a écrit :

Hi All!
  I have a single query that spans over a set of per client private data using routing, as well as, a global dataset with no routing. 

I would like to combine this into a single query, but end up needing to set different routing values per index, eg the private index has the clientid routing value and the global index does not have a routing value. 

Is this currently possible? If not, any issues if I open a feature request? 

My current workaround is to simply run two queries and merge those results. This approach doesn't work great with relevancy since the scores are computed in isolation and also make pagination painful. 

Thanks!
Paul

--
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="XHGxsKkLpPkJ" _originalhref="javascript:">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.
Reply | Threaded
Open this post in threaded view
|

Re: Different routing configs in a single query?

dadoonet
I don't think you can do it at this time with the current API.
No more idea so far :-/

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 25 nov. 2013 à 20:27, ppearcy <[hidden email]> a écrit :

Hi David, 
  I don't want to span all shards for the private index (so I use per client routing here), while I do for the global one (so, no routing specified here). 

Thanks!

On Monday, November 25, 2013 2:25:19 PM UTC-5, David Pilato wrote:
Hi Paul,


In that case, why do you specify routing value? If you don't set it when querying then all shards will be queried.

Could you elaborate a bit more?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 nov. 2013 à 20:06, ppearcy <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="XHGxsKkLpPkJ" _originalhref="javascript:">ppe...@...> a écrit :

Hi All!
  I have a single query that spans over a set of per client private data using routing, as well as, a global dataset with no routing. 

I would like to combine this into a single query, but end up needing to set different routing values per index, eg the private index has the clientid routing value and the global index does not have a routing value. 

Is this currently possible? If not, any issues if I open a feature request? 

My current workaround is to simply run two queries and merge those results. This approach doesn't work great with relevancy since the scores are computed in isolation and also make pagination painful. 

Thanks!
Paul

--
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="XHGxsKkLpPkJ" _originalhref="javascript:">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.

--
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
|

Re: Different routing configs in a single query?

ppearcy
Thanks! FYI, I opened this request:
https://github.com/elasticsearch/elasticsearch/issues/4272

It really is just a nice to have, but seems easy enough. I'd think a few others would have similar use cases. 

Best Regards,
Paul

On Monday, November 25, 2013 3:44:10 PM UTC-5, David Pilato wrote:
I don't think you can do it at this time with the current API.
No more idea so far :-/

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 25 nov. 2013 à 20:27, ppearcy <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="A7BrLYPqFEcJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ppe...@...> a écrit :

Hi David, 
  I don't want to span all shards for the private index (so I use per client routing here), while I do for the global one (so, no routing specified here). 

Thanks!

On Monday, November 25, 2013 2:25:19 PM UTC-5, David Pilato wrote:
Hi Paul,


In that case, why do you specify routing value? If you don't set it when querying then all shards will be queried.

Could you elaborate a bit more?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 nov. 2013 à 20:06, ppearcy <[hidden email]> a écrit :

Hi All!
  I have a single query that spans over a set of per client private data using routing, as well as, a global dataset with no routing. 

I would like to combine this into a single query, but end up needing to set different routing values per index, eg the private index has the clientid routing value and the global index does not have a routing value. 

Is this currently possible? If not, any issues if I open a feature request? 

My current workaround is to simply run two queries and merge those results. This approach doesn't work great with relevancy since the scores are computed in isolation and also make pagination painful. 

Thanks!
Paul

--
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.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="A7BrLYPqFEcJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank" onmousedown="this.href='https://groups.google.com/groups/opt_out';return true;" onclick="this.href='https://groups.google.com/groups/opt_out';return true;">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].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8085b54c-2c57-4f71-88f9-1aa24e1efdf8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.