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 Nikhil Chhaochharia <ni...@yahoo.com> on 2008/02/25 12:22:53 UTC
Field specific synonyms
Hi,
I am using the 'text' fieldType from the sample schema.xml of Solr.
I have multiple fields which are of 'text' type but I want to use separate synonym files for each of the fields. For example, SynonymFilter should use synonym_abcd.txt for the field named 'abcd' and synonym_xyz.txt for the field named 'xyz'.
Any suggestions on how to achieve this? I am using the latest nightly build of Solr.
Thanks,
Nikhil
Re: Field specific synonyms
Posted by Grant Ingersoll <gs...@apache.org>.
I believe the answer is you will need to have a different field type
for each. Just copy the text field type and name it text-abcd, etc.
with each one configured to use the synonym file you want.
-Grant
On Feb 25, 2008, at 6:22 AM, Nikhil Chhaochharia wrote:
>
> Hi,
>
> I am using the 'text' fieldType from the sample schema.xml of Solr.
>
> I have multiple fields which are of 'text' type but I want to use
> separate synonym files for each of the fields. For example,
> SynonymFilter should use synonym_abcd.txt for the field named 'abcd'
> and synonym_xyz.txt for the field named 'xyz'.
>
> Any suggestions on how to achieve this? I am using the latest
> nightly build of Solr.
>
> Thanks,
> Nikhil
>
>
>
Re: Field specific synonyms
Posted by Yonik Seeley <yo...@apache.org>.
On Mon, Feb 25, 2008 at 6:22 AM, Nikhil Chhaochharia
<ni...@yahoo.com> wrote:
> I am using the 'text' fieldType from the sample schema.xml of Solr.
>
> I have multiple fields which are of 'text' type but I want to use separate synonym files for each of the fields. For example, SynonymFilter should use synonym_abcd.txt for the field named 'abcd' and synonym_xyz.txt for the field named 'xyz'.
>
> Any suggestions on how to achieve this? I am using the latest nightly build of Solr.
Make a different text field (e.g. text1, text2, text3) for each one.
Use the original text field as a template (just change the name and
the synonym file).
-Yonik