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 Cheng <zh...@gmail.com> on 2012/02/23 05:48:26 UTC

TaxonomySearch & similar words?

Hi,

I am using Taxonomy Search to build a facet comprising things such as
“/author/American/Mark Twain”.

Since the word "author" has a synonym of "writer", can I use "writer"
instead of "author" to get the path?

Currently I can only use exactly the word "author" to do it.

Thanks

Re: TaxonomySearch & similar words?

Posted by Cheng <zh...@gmail.com>.
Thank you. The alternative sounds reasonable.

On Thu, Feb 23, 2012 at 12:54 PM, Shai Erera <se...@gmail.com> wrote:

> Hi Cheng,
>
> You will need to use the exact path labels in order to get to the category
> 'Mark Twain', unless you index multiple paths from start, e.g.:
> /author/American/Mark Twain
> /writer/American/Mart Twain
>
> The taxonomy index does not process the CategoryPath labels in anyway to
> e.g. produce synonyms, but rather, keeps them as-is.
>
> Another alternative is to write a simple module that at runtime will
> replace author/writer by one value that you choose to store in the
> taxonomy, an so your users will be able to count /author or /writer
> interchangeably.
>
> I prefer the second approach because it keeps the taxonomy small, which is
> preferred at runtime (when facet counts are required).
>
> Shai
>
> On Thu, Feb 23, 2012 at 6:48 AM, Cheng <zh...@gmail.com> wrote:
>
> > Hi,
> >
> > I am using Taxonomy Search to build a facet comprising things such as
> > “/author/American/Mark Twain”.
> >
> > Since the word "author" has a synonym of "writer", can I use "writer"
> > instead of "author" to get the path?
> >
> > Currently I can only use exactly the word "author" to do it.
> >
> > Thanks
> >
>

Re: TaxonomySearch & similar words?

Posted by Shai Erera <se...@gmail.com>.
Hi Cheng,

You will need to use the exact path labels in order to get to the category
'Mark Twain', unless you index multiple paths from start, e.g.:
/author/American/Mark Twain
/writer/American/Mart Twain

The taxonomy index does not process the CategoryPath labels in anyway to
e.g. produce synonyms, but rather, keeps them as-is.

Another alternative is to write a simple module that at runtime will
replace author/writer by one value that you choose to store in the
taxonomy, an so your users will be able to count /author or /writer
interchangeably.

I prefer the second approach because it keeps the taxonomy small, which is
preferred at runtime (when facet counts are required).

Shai

On Thu, Feb 23, 2012 at 6:48 AM, Cheng <zh...@gmail.com> wrote:

> Hi,
>
> I am using Taxonomy Search to build a facet comprising things such as
> “/author/American/Mark Twain”.
>
> Since the word "author" has a synonym of "writer", can I use "writer"
> instead of "author" to get the path?
>
> Currently I can only use exactly the word "author" to do it.
>
> Thanks
>