You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Gimantha Bandara <gi...@wso2.com> on 2015/03/04 10:08:28 UTC

Difference between CategoryPath and Plain FacetFields with hierarchy

Hi,

I am new to Lucene faceting and taxonomy. I saw few examples in some blogs
and in facets guide. Some have used CategoryPath with TaxonomyWriters,
TaxonomyReaders and FacetSearchParams. Some have used FacetFields without
using taxonomyWriters and TaxonomyReaders. What is the difference between
both these approaches? What is the recommended approach to to create a
faceted search application? For so called two different approaches please
refer to [1] and [2]

[1] http://www.hascode.com/2012/08/lucene-snippets-faceting-search/
[2] http://www.norconex.com/facets-with-lucene/

-- 
Gimantha Bandara
Software Engineer
WSO2. Inc : http://wso2.com
Mobile : +94714961919

Re: Difference between CategoryPath and Plain FacetFields with hierarchy

Posted by Michael McCandless <lu...@mikemccandless.com>.
On Fri, Mar 6, 2015 at 2:04 AM, Gimantha Bandara <gi...@wso2.com> wrote:

> I am going to use FacetFields/FacetsConfig. So using FacetFields we can
> define a hierarchy like below.
>
> doc.add(new FacetField("Publish Date", "2012", "1", "7"))
>
> Is it possible to use FacetFields like this, as we could do with
> CategoryPath?
>
> doc.add(new FacetField("Publish Date", "2012/1/7"))

I don't think so: you must split it yourself.

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Difference between CategoryPath and Plain FacetFields with hierarchy

Posted by Gimantha Bandara <gi...@wso2.com>.
Thanks Michael,

I am going to use FacetFields/FacetsConfig. So using FacetFields we can
define a hierarchy like below.

doc.add(new FacetField("Publish Date", "2012", "1", "7"))


Is it possible to use FacetFields like this, as we could do with
CategoryPath?

doc.add(new FacetField("Publish Date", "2012/1/7"))




On Thu, Mar 5, 2015 at 8:17 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> The facets API changed in 5.0, from CategoryPath/FacetSearchParams to
> FacetFields/FacetsConfig.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Thu, Mar 5, 2015 at 2:13 AM, Gimantha Bandara <gi...@wso2.com>
> wrote:
> > Hi,
> >
> > Any help on this? Or Can someone point me to Faceted User guide of
> 4.10.3.
> > I cannot find it. Is it only available for Older version?
> >
> > On Wed, Mar 4, 2015 at 2:38 PM, Gimantha Bandara <gi...@wso2.com>
> wrote:
> >
> >> Hi,
> >>
> >> I am new to Lucene faceting and taxonomy. I saw few examples in some
> blogs
> >> and in facets guide. Some have used CategoryPath with TaxonomyWriters,
> >> TaxonomyReaders and FacetSearchParams. Some have used FacetFields
> without
> >> using taxonomyWriters and TaxonomyReaders. What is the difference
> between
> >> both these approaches? What is the recommended approach to to create a
> >> faceted search application? For so called two different approaches
> please
> >> refer to [1] and [2]
> >>
> >> [1] http://www.hascode.com/2012/08/lucene-snippets-faceting-search/
> >> [2] http://www.norconex.com/facets-with-lucene/
> >>
> >> --
> >> Gimantha Bandara
> >> Software Engineer
> >> WSO2. Inc : http://wso2.com
> >> Mobile : +94714961919
> >>
> >
> >
> >
> > --
> > Gimantha Bandara
> > Software Engineer
> > WSO2. Inc : http://wso2.com
> > Mobile : +94714961919
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Gimantha Bandara
Software Engineer
WSO2. Inc : http://wso2.com
Mobile : +94714961919

Re: Difference between CategoryPath and Plain FacetFields with hierarchy

Posted by Michael McCandless <lu...@mikemccandless.com>.
The facets API changed in 5.0, from CategoryPath/FacetSearchParams to
FacetFields/FacetsConfig.

Mike McCandless

http://blog.mikemccandless.com


On Thu, Mar 5, 2015 at 2:13 AM, Gimantha Bandara <gi...@wso2.com> wrote:
> Hi,
>
> Any help on this? Or Can someone point me to Faceted User guide of 4.10.3.
> I cannot find it. Is it only available for Older version?
>
> On Wed, Mar 4, 2015 at 2:38 PM, Gimantha Bandara <gi...@wso2.com> wrote:
>
>> Hi,
>>
>> I am new to Lucene faceting and taxonomy. I saw few examples in some blogs
>> and in facets guide. Some have used CategoryPath with TaxonomyWriters,
>> TaxonomyReaders and FacetSearchParams. Some have used FacetFields without
>> using taxonomyWriters and TaxonomyReaders. What is the difference between
>> both these approaches? What is the recommended approach to to create a
>> faceted search application? For so called two different approaches please
>> refer to [1] and [2]
>>
>> [1] http://www.hascode.com/2012/08/lucene-snippets-faceting-search/
>> [2] http://www.norconex.com/facets-with-lucene/
>>
>> --
>> Gimantha Bandara
>> Software Engineer
>> WSO2. Inc : http://wso2.com
>> Mobile : +94714961919
>>
>
>
>
> --
> Gimantha Bandara
> Software Engineer
> WSO2. Inc : http://wso2.com
> Mobile : +94714961919

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Difference between CategoryPath and Plain FacetFields with hierarchy

Posted by Gimantha Bandara <gi...@wso2.com>.
Hi,

Any help on this? Or Can someone point me to Faceted User guide of 4.10.3.
I cannot find it. Is it only available for Older version?

On Wed, Mar 4, 2015 at 2:38 PM, Gimantha Bandara <gi...@wso2.com> wrote:

> Hi,
>
> I am new to Lucene faceting and taxonomy. I saw few examples in some blogs
> and in facets guide. Some have used CategoryPath with TaxonomyWriters,
> TaxonomyReaders and FacetSearchParams. Some have used FacetFields without
> using taxonomyWriters and TaxonomyReaders. What is the difference between
> both these approaches? What is the recommended approach to to create a
> faceted search application? For so called two different approaches please
> refer to [1] and [2]
>
> [1] http://www.hascode.com/2012/08/lucene-snippets-faceting-search/
> [2] http://www.norconex.com/facets-with-lucene/
>
> --
> Gimantha Bandara
> Software Engineer
> WSO2. Inc : http://wso2.com
> Mobile : +94714961919
>



-- 
Gimantha Bandara
Software Engineer
WSO2. Inc : http://wso2.com
Mobile : +94714961919