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 David Whalen <dw...@enr-corp.com> on 2007/07/30 23:36:54 UTC
faceting on multiple columns
Hi All.
I am using facets to help me build an ajax-driven tree for
search results. When the search is first run, all I need to
do is show the counts per facet, for example
search results for "fred"
+--A (102)
+--B (234)
+--C (721)
+--D (512)
sounds simple, but I also need to break-down the results from
"D" by a different index in lucene:
search results for "fred"
+--A (102)
+--B (234)
+--C (721)
+--D (512)
+--D1 (19)
+--D2 (34)
+--D3 (45)
what I have been doing in my solr querystring looks like this:
rows=0&facet=true&facet.limit=-1&facet.field=<field1>&facet.field=<field
2>
Unfortunately we're seeing really bad performance and we're
constantly running out of heap space on this type of query.
So, my question is, would breaking this into two calls perform
better? That is,
rows=0&facet=true&facet.limit=-1&facet.field=<field1>
and then
rows=0&facet=true&facet.limit=-1&facet.field=<field2>
?
It seems to me that two calls would have more overhead than one,
but it might lessen the impact on the heap space on my server.
Anyone work enough with facets to throw in their two cents?
Thanks!
Dave W.
Re: faceting on multiple columns
Posted by Yonik Seeley <yo...@apache.org>.
On 7/30/07, David Whalen <dw...@enr-corp.com> wrote:
> Hi All.
>
> I am using facets to help me build an ajax-driven tree for
> search results. When the search is first run, all I need to
> do is show the counts per facet, for example
>
> search results for "fred"
> +--A (102)
> +--B (234)
> +--C (721)
> +--D (512)
>
> sounds simple, but I also need to break-down the results from
> "D" by a different index in lucene:
>
> search results for "fred"
> +--A (102)
> +--B (234)
> +--C (721)
> +--D (512)
> +--D1 (19)
> +--D2 (34)
> +--D3 (45)
>
> what I have been doing in my solr querystring looks like this:
>
> rows=0&facet=true&facet.limit=-1&facet.field=<field1>&facet.field=<field
> 2>
>
> Unfortunately we're seeing really bad performance and we're
> constantly running out of heap space on this type of query.
>
> So, my question is, would breaking this into two calls perform
> better? That is,
>
> rows=0&facet=true&facet.limit=-1&facet.field=<field1>
>
> and then
>
> rows=0&facet=true&facet.limit=-1&facet.field=<field2>
>
> ?
>
> It seems to me that two calls would have more overhead than one,
> but it might lessen the impact on the heap space on my server.
The memory needs would be the same, but with more CPU overhead for 2 requests.
If you can't increase the heap enough, or you can't reduce the memory
via upgrading to Solr 1.2 and using facet.enum.cache.minDf, then what
you could do is have two search servers (or two sets of search
servers) and send all facet requests for field1 to server1 and all
facet requests for field2 to server2.
-Yonik