Yes, all the three options (copy fields, using dynamic fields and the
SortableTextField) are feasible. Since I am on the 7.5.0 version of Solr, I
will go ahead with the SortableTextField option.

 Thank you team!!

On Fri, Dec 7, 2018 at 8:46 PM Alexandre Rafalovitch <arafa...@gmail.com>
wrote:

> If you are on the latest Solr (7.3+), try switching from TextField to
> SortableTextField in your string_ci definition above.
>
> That type implicitly uses docValues and should return original text
> for faceting purposes, while still allowing analyzers.
>
> Regards,
>    Alex.
> On Thu, 6 Dec 2018 at 08:26, Ritesh Kumar
> <ritesh.ku...@hotwaxsystems.com> wrote:
> >
> > Hello team,
> >
> > I am trying to prepare facet on a field of type string. The facet data
> will
> > be shown according to the user's query on this very field.
> >
> > <field name="fieldName" type="string" indexed="true" stored="true"
> > required="false" multiValued="false"/>
> >
> >
> > As this field is of type string, it works fine with case sensitive
> query. I
> > want to be able to query on this field irrespective of the case.
> >
> > I tried changing the field type to string_ci as defined below
> >
> > <fieldType name="string_ci" class="solr.TextField" sortMissingLast="true"
> > omitNorms="true">
> >     <analyzer type="query">
> >         <tokenizer class="solr.KeywordTokenizerFactory"/>
> >         <filter class="solr.LowerCaseFilterFactory"/>
> >     </analyzer>
> > </fieldType>
> >
> > <field name="fieldName" type="string_ci" indexed="true" stored="true"
> > required="false" multiValued="false"/>
> >
> > Now, in this case, I am able to perform a case-insensitive query but the
> > facet values are being shown in lowercase.
> >
> > I want to be able to perform a case-insensitive query on this field but
> > show the original data.
> > Is there anything I can do achieve this.
> >
> > Best,
> >
> > --
> > Ritesh Kumar
>

Reply via email to