You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Seffie Schwartz <ys...@yahoo.com> on 2010/03/05 03:40:00 UTC
faceting on multiple fields
Hi -
How do I facet on two fields at the same time - If I were using a data base I would say -
select a,b,count(*) from mytable group by a,b order by count(*) desc.
How could I do the same with faceting. I know that I can facet on a separately and b separately but how do
I do a & b.
Another question -
If I had two tables in my relational data base - For example I have an organization and an employee table in my data base. I join the tables
and flatten them. Then I index them into solr. How could I know if there are any organizations without employees in solr? In a data base I would
do a left join.
Thanks. Seffie Schwartz.
Re: faceting on multiple fields
Posted by Lance Norskog <go...@gmail.com>.
Faceting:
&facet=true&facet.
Look at http://wiki.apache.org/solr/SimpleFacetParameters#Facet_Fields_with_No_Zeros_And_Missing_Count_For_One_Field
Notice the f.cat.facet.missing=true parameter. This lets you address
fields separately.
Joins:
This query find documents with no value for a field: *:*+-field:[* TO *]
On Thu, Mar 4, 2010 at 6:40 PM, Seffie Schwartz <ys...@yahoo.com> wrote:
> Hi -
>
> How do I facet on two fields at the same time - If I were using a data base I would say -
>
> select a,b,count(*) from mytable group by a,b order by count(*) desc.
>
> How could I do the same with faceting. I know that I can facet on a separately and b separately but how do
> I do a & b.
>
> Another question -
>
> If I had two tables in my relational data base - For example I have an organization and an employee table in my data base. I join the tables
> and flatten them. Then I index them into solr. How could I know if there are any organizations without employees in solr? In a data base I would
> do a left join.
>
> Thanks. Seffie Schwartz.
>
>
>
--
Lance Norskog
goksron@gmail.com
Re: faceting on multiple fields
Posted by Erick Erickson <er...@gmail.com>.
Please post further questions on this topic to the solr
users' list at solr-user@lucene.apache.org. This list is
intended for internal SOLR development discussions.....
Best
Erick
On Thu, Mar 4, 2010 at 9:40 PM, Seffie Schwartz <ys...@yahoo.com> wrote:
> Hi -
>
> How do I facet on two fields at the same time - If I were using a data
> base I would say -
>
> select a,b,count(*) from mytable group by a,b order by count(*) desc.
>
> How could I do the same with faceting. I know that I can facet on a
> separately and b separately but how do
> I do a & b.
>
> Another question -
>
> If I had two tables in my relational data base - For example I have an
> organization and an employee table in my data base. I join the tables
> and flatten them. Then I index them into solr. How could I know if there
> are any organizations without employees in solr? In a data base I would
> do a left join.
>
> Thanks. Seffie Schwartz.
>
>
>