You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Toby Lazar <tl...@capitaltg.com> on 2013/10/20 05:04:49 UTC
pivot range faceting
Is it possible to get pivot info on a range-faceted query? For example, if
I want to query the number of orders placed in January, February, etc., I
know I can use a simple range search. If I want to get the number of
orders by category, I can do that easily by faceting on category. I'm
wondering if I can get the number of all orders by month, and also broken
down by category. Is that possible in a single query?
Thanks,
Toby
Re: pivot range faceting
Posted by Bram Van Dam <br...@intix.eu>.
On 10/21/2013 03:46 AM, Toby Lazar wrote:
> Thanks for confirming my fears. I saw some presentations where I thought
> this feature was used, but perhaps it was done performing multiple range
> queries.
Probably. I had a look at implementing the feature (because it's
something we rely on quite a bit), but decided against it. The solr
implementation of faceting is hard to get my head around -- and
launching multiple queries seems to outperform pivot queries anyway.
You can use a range query to determine the ranges (and their total
counts), and then launch an extra query per range.
Re: pivot range faceting
Posted by Toby Lazar <tl...@capitaltg.com>.
Thanks for confirming my fears. I saw some presentations where I thought
this feature was used, but perhaps it was done performing multiple range
queries.
Any chance there is a way for copyField to copy a function of a field
instead of the original itself is there? Or, must this be done by the
application?
Thank you again for your help.
Toby
*******************************
Toby Lazar
Capital Technology Group
Email: tlazar@capitaltg.com
Mobile: 646-469-5865
*******************************
On Sun, Oct 20, 2013 at 2:39 PM, Upayavira <uv...@odoko.co.uk> wrote:
>
>
> On Sun, Oct 20, 2013, at 04:04 AM, Toby Lazar wrote:
> > Is it possible to get pivot info on a range-faceted query? For example,
> > if
> > I want to query the number of orders placed in January, February, etc., I
> > know I can use a simple range search. If I want to get the number of
> > orders by category, I can do that easily by faceting on category. I'm
> > wondering if I can get the number of all orders by month, and also broken
> > down by category. Is that possible in a single query?
>
> You can't yet include a range facet within a pivot. The way to achieve
> this is to store a version of your date field rounded to the nearest
> month, then you will be able to use that field in a pivot facet.
>
> Obviously, this requires index time effort, which is less than ideal.
>
> I guess this is a feature just waiting for someone to implement it.
>
> Upayavira
>
Re: pivot range faceting
Posted by Upayavira <uv...@odoko.co.uk>.
On Sun, Oct 20, 2013, at 04:04 AM, Toby Lazar wrote:
> Is it possible to get pivot info on a range-faceted query? For example,
> if
> I want to query the number of orders placed in January, February, etc., I
> know I can use a simple range search. If I want to get the number of
> orders by category, I can do that easily by faceting on category. I'm
> wondering if I can get the number of all orders by month, and also broken
> down by category. Is that possible in a single query?
You can't yet include a range facet within a pivot. The way to achieve
this is to store a version of your date field rounded to the nearest
month, then you will be able to use that field in a pivot facet.
Obviously, this requires index time effort, which is less than ideal.
I guess this is a feature just waiting for someone to implement it.
Upayavira