On 29 January 2013 23:34, O. Olson <olson_...@yahoo.it> wrote:
[...]
> Thank you. Good call Gora, I forgot to mention about the query. I am trying
> to query something like the following in the URL for the Example:
> http://localhost:8983/solr/db/select
>
> ?q=<query>&facet=true&facet.field=Category1
>
> I expect the above query to give me the counts for the products that satisfy
> the <query> in Category1. For example given my <query> I get: Hardware (21),
> Software (3), Office Supplies (10). These are Category1 values.  Lets then
> say a user selects Hardware. I think I would do something like:
>
>
> ?q=<query>&facet=true&fq=Category1:Hardware&facet.field=Category2
>
> I assume this would be give me the list of Category 2 values e.g. Printers
> (7), Fax Machines (11), LCD Monitors (3) (7 + 11 + 3 = 21).
>
> You suggest I create separate entities for each Category Level. Would this
> affect my schema? i.e. would the above queries work??

Yes, things should function as you describe, and no you should not
need any change in your schema from changing the DIH configuration
file. Please take a look at
http://wiki.apache.org/solr/SolrFacetingOverview#Facet_Indexing for
how best to define faceting fields. Also, see this tutorial on faceted
search with Solr: http://searchhub.org/2009/09/02/faceted-search-with-solr/

Regards,
Gora

Reply via email to