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 Jay Potharaju <js...@gmail.com> on 2016/06/23 23:49:02 UTC

clarification on using docvalues for sorting

Hi,
I am trying to do a case insensitive sorting on couple of fields.
For this I am doing the following

 <fieldType name="string_ci" class="solr.TextField" sortMissingLast="true"
omitNorms="true">
     <analyzer>
    <tokenizer class="solr.KeywordTokenizerFactory"/>
   <filter class="solr.LowerCaseFilterFactory" />
        </analyzer>
    </fieldType>

Above would not allow using this datatype with docvalues. Docvalues can
only be used with string & trie fields.
And also docvalues are recommended for sorting & faceting.

How can i accomplish using docvalues for case-insensitive field types.?
Or what I am trying to do is not possible.

-- 
Thanks
Jay

Re: clarification on using docvalues for sorting

Posted by Alessandro Benedetti <ab...@apache.org>.
This is a recurrent question,
according to my knowledge docValues are not supported for analyzed fields (
even if the analysis is simply not tokenizing but only lowercasing).
At the moment as Erick suggested I encourage you to do the lowercasing
before the indexing phase, when you supply your data to solr.

A contribution for docValues supporting single token tokenized  analyzers
would be more than welcome.

Cheers

On Fri, Jun 24, 2016 at 1:44 AM, Erick Erickson <er...@gmail.com>
wrote:

> You'd have to lowercase when the doc is
> prepared I'd think.
>
> Best,
> Erick
>
> On Thu, Jun 23, 2016 at 4:49 PM, Jay Potharaju <js...@gmail.com>
> wrote:
> > Hi,
> > I am trying to do a case insensitive sorting on couple of fields.
> > For this I am doing the following
> >
> >  <fieldType name="string_ci" class="solr.TextField"
> sortMissingLast="true"
> > omitNorms="true">
> >      <analyzer>
> >     <tokenizer class="solr.KeywordTokenizerFactory"/>
> >    <filter class="solr.LowerCaseFilterFactory" />
> >         </analyzer>
> >     </fieldType>
> >
> > Above would not allow using this datatype with docvalues. Docvalues can
> > only be used with string & trie fields.
> > And also docvalues are recommended for sorting & faceting.
> >
> > How can i accomplish using docvalues for case-insensitive field types.?
> > Or what I am trying to do is not possible.
> >
> > --
> > Thanks
> > Jay
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Re: clarification on using docvalues for sorting

Posted by Erick Erickson <er...@gmail.com>.
You'd have to lowercase when the doc is
prepared I'd think.

Best,
Erick

On Thu, Jun 23, 2016 at 4:49 PM, Jay Potharaju <js...@gmail.com> wrote:
> Hi,
> I am trying to do a case insensitive sorting on couple of fields.
> For this I am doing the following
>
>  <fieldType name="string_ci" class="solr.TextField" sortMissingLast="true"
> omitNorms="true">
>      <analyzer>
>     <tokenizer class="solr.KeywordTokenizerFactory"/>
>    <filter class="solr.LowerCaseFilterFactory" />
>         </analyzer>
>     </fieldType>
>
> Above would not allow using this datatype with docvalues. Docvalues can
> only be used with string & trie fields.
> And also docvalues are recommended for sorting & faceting.
>
> How can i accomplish using docvalues for case-insensitive field types.?
> Or what I am trying to do is not possible.
>
> --
> Thanks
> Jay