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 "McGibbney, Lewis John" <Le...@gcu.ac.uk> on 2011/03/15 16:38:29 UTC

Faceting help

Hello list,

I'm trying to use facet's via widget's within Ajax-Solr. I have tried the wiki for general help on configuring facets and constraints and also attended the recent Lucidworks webinar on faceted search. Can anyone please direct me to some reading on how to formally configure facets for searching.

Currently my facets are configured as follows

      'facet.field': [ 'topics', 'organisations', 'exchanges', 'countryCodes' ],
      'facet.limit': 20,
      'facet.mincount': 1,
      'f.topics.facet.limit': 50,
      'f.countryCodes.facet.limit': -1,
      'facet.date': 'date',
      'facet.date.start': '1987-02-26T00:00:00.000Z/DAY',
      'facet.date.end': '1987-10-20T00:00:00.000Z/DAY+1DAY',
      'facet.date.gap': '+1DAY',
      'json.nl': 'map'

However I wish to change the fields to contain some constraints such as

Topics < field
  Legislation < constraint
  Guidance/Policies < constraint
  Customer Service information/complaints procedure < constraint
  financial information < constraint
  etc etc

Source < field
  html < constraint < constraint
  pdf < constraint
  email < constraint
  etc etc

Date < field
   < constraint

Basically I need resources to understand how to implement the above instead of the example I currently have.
Some guidance would be great
Thank you kindly

Lewis

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

RE: Faceting help

Posted by "McGibbney, Lewis John" <Le...@gcu.ac.uk>.
Hi Upayavira,

I use the term constraint to define additional options for a user to refine search with under each facet. If we could think
of them as sub facet's then maybe this would explain in slightly better terms.

I didn't add additional document source types in my original email but if I knew that there would be xls and doc contained within the
Solr index then these would also be added as sub facet's allowing a user to select prior to entering a search query.

Can you point me towards documentation or something similar in order to implement the above. I am aware that I have a lot more to
learn on faceted search, namely how to properly implement it!

Thank you Lewis
________________________________________
From: Upayavira [uv@odoko.co.uk]
Sent: 15 March 2011 22:42
To: solr-user@lucene.apache.org
Subject: Re: Faceting help

I'm not sure if I get what you are trying to achieve. What do you mean
by "constraint"?

Are you saying that you effectively want to filter the facets that are
returned?

e.g. for source field, you want to show html/pdf/email, but not, say xls
or doc?

Upayavira


> Topics < field
>   Legislation < constraint
>   Guidance/Policies < constraint
>   Customer Service information/complaints procedure < constraint
>   financial information < constraint
>   etc etc
>
> Source < field
>   html < constraint < constraint
>   pdf < constraint
>   email < constraint
>   etc etc
>
> Date < field
>    < constraint
>
> Basically I need resources to understand how to implement the above
> instead of the example I currently have.
> Some guidance would be great
> Thank you kindly
>
> Lewis
>
> Glasgow Caledonian University is a registered Scottish charity, number
> SC021474
>
> Winner: Times Higher Education’s Widening Participation Initiative of the
> Year 2009 and Herald Society’s Education Initiative of the Year 2009.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
>
> Winner: Times Higher Education’s Outstanding Support for Early Career
> Researchers of the Year 2010, GCU as a lead with Universities Scotland
> partners.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
>
---
Enterprise Search Consultant at Sourcesense UK,
Making Sense of Open Source

Email has been scanned for viruses by Altman Technologies' email management service - www.altman.co.uk/emailsystems

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

Re: Faceting help

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm not sure if I get what you are trying to achieve. What do you mean
: by "constraint"?

"constraint" it fairly standard terminology when refering to facets, it's 
used extensively in our facet docs and is even listed on solr's glossary 
page (allthough not specificyly in hte context of faceting since it can 
be used more broadly then that)...

http://wiki.apache.org/solr/SolrTerminology

In a nutshell:

A facet is a way of classifying objects
A constraint is a viable way of limiting a set of objects

faceted search is a search where feedback on viable constraints 
(usually in the form of counts) is provided for each facet.  (ie: "facet 
counts" or "constraint counts" ... the terms are both used relatively 
loosely)

: > I'm trying to use facet's via widget's within Ajax-Solr. I have tried the
: > wiki for general help on configuring facets and constraints and also
: > attended the recent Lucidworks webinar on faceted search. Can anyone
: > please direct me to some reading on how to formally configure facets for
: > searching.

the beauty of faceting in solr is that it doesn't have ot be formally 
configured -- you can specify it all at query time using request params as 
long as the data is indexed...

http://wiki.apache.org/solr/SolrFacetingOverview
http://wiki.apache.org/solr/SimpleFacetParameters

: > Topics < field
: >   Legislation < constraint
: >   Guidance/Policies < constraint
: >   Customer Service information/complaints procedure < constraint
: >   financial information < constraint

if you index a "Topic" field, and the topic field contains those field 
values as indexed terms, then you will get those constraints back using 
"facet.field=Topics"


-Hoss

Re: Faceting help

Posted by Upayavira <uv...@odoko.co.uk>.
I'm not sure if I get what you are trying to achieve. What do you mean
by "constraint"?

Are you saying that you effectively want to filter the facets that are
returned?

e.g. for source field, you want to show html/pdf/email, but not, say xls
or doc?

Upayavira

On Tue, 15 Mar 2011 15:38 +0000, "McGibbney, Lewis John"
<Le...@gcu.ac.uk> wrote:
> Hello list,
> 
> I'm trying to use facet's via widget's within Ajax-Solr. I have tried the
> wiki for general help on configuring facets and constraints and also
> attended the recent Lucidworks webinar on faceted search. Can anyone
> please direct me to some reading on how to formally configure facets for
> searching.
> 
> Currently my facets are configured as follows
> 
>       'facet.field': [ 'topics', 'organisations', 'exchanges',
>       'countryCodes' ],
>       'facet.limit': 20,
>       'facet.mincount': 1,
>       'f.topics.facet.limit': 50,
>       'f.countryCodes.facet.limit': -1,
>       'facet.date': 'date',
>       'facet.date.start': '1987-02-26T00:00:00.000Z/DAY',
>       'facet.date.end': '1987-10-20T00:00:00.000Z/DAY+1DAY',
>       'facet.date.gap': '+1DAY',
>       'json.nl': 'map'
> 
> However I wish to change the fields to contain some constraints such as
> 
> Topics < field
>   Legislation < constraint
>   Guidance/Policies < constraint
>   Customer Service information/complaints procedure < constraint
>   financial information < constraint
>   etc etc
> 
> Source < field
>   html < constraint < constraint
>   pdf < constraint
>   email < constraint
>   etc etc
> 
> Date < field
>    < constraint
> 
> Basically I need resources to understand how to implement the above
> instead of the example I currently have.
> Some guidance would be great
> Thank you kindly
> 
> Lewis
> 
> Glasgow Caledonian University is a registered Scottish charity, number
> SC021474
> 
> Winner: Times Higher Education’s Widening Participation Initiative of the
> Year 2009 and Herald Society’s Education Initiative of the Year 2009.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
> 
> Winner: Times Higher Education’s Outstanding Support for Early Career
> Researchers of the Year 2010, GCU as a lead with Universities Scotland
> partners.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
> 
--- 
Enterprise Search Consultant at Sourcesense UK, 
Making Sense of Open Source