You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by "WU, Zhiqing" <zw...@ennov.com> on 2022/05/17 20:21:45 UTC

How to select the class of fields

Hello,
We are going to change the class of key fields in our Solr. We hope these
fields are sortable and can be used for grouping and searching.
We have considered solr.StrField, TextField and SortableTextField. However,
we notice that StrField is not case-insensitive, which is not good for
searching. TextField is not sortable and SortableTextField is not good if
it is used for faceting.
If we do not want two separate fields (not very efficient) -- one for
sorting and one for faceting, is there another option we can choose? Is it
possible to let StrField become case-insensitive?
Many thanks in advance.
Kind regards,
Zhiqing

Re: How to select the class of fields

Posted by "WU, Zhiqing" <zw...@ennov.com>.
Hi Thomas,
Many thanks for your suggestion.
It seems many people have the same issue.
OK, we will use two different fields to reach our target.
Kind regards,
Zhiqing

On Tue, 17 May 2022 at 22:12, Thomas Corthals <th...@klascement.net> wrote:

> Hi Zhiqing,
>
> It is very common with Solr to have the same value indexed in different
> fields with different analyses. If you do it with copyField, you don't even
> have to worry about it at index time.
>
> Thomas
>
> Op di 17 mei 2022 om 22:21 schreef WU, Zhiqing <zw...@ennov.com>:
>
> > Hello,
> > We are going to change the class of key fields in our Solr. We hope these
> > fields are sortable and can be used for grouping and searching.
> > We have considered solr.StrField, TextField and SortableTextField.
> However,
> > we notice that StrField is not case-insensitive, which is not good for
> > searching. TextField is not sortable and SortableTextField is not good if
> > it is used for faceting.
> > If we do not want two separate fields (not very efficient) -- one for
> > sorting and one for faceting, is there another option we can choose? Is
> it
> > possible to let StrField become case-insensitive?
> > Many thanks in advance.
> > Kind regards,
> > Zhiqing
> >
>

Re: How to select the class of fields

Posted by Thomas Corthals <th...@klascement.net>.
Hi Zhiqing,

It is very common with Solr to have the same value indexed in different
fields with different analyses. If you do it with copyField, you don't even
have to worry about it at index time.

Thomas

Op di 17 mei 2022 om 22:21 schreef WU, Zhiqing <zw...@ennov.com>:

> Hello,
> We are going to change the class of key fields in our Solr. We hope these
> fields are sortable and can be used for grouping and searching.
> We have considered solr.StrField, TextField and SortableTextField. However,
> we notice that StrField is not case-insensitive, which is not good for
> searching. TextField is not sortable and SortableTextField is not good if
> it is used for faceting.
> If we do not want two separate fields (not very efficient) -- one for
> sorting and one for faceting, is there another option we can choose? Is it
> possible to let StrField become case-insensitive?
> Many thanks in advance.
> Kind regards,
> Zhiqing
>