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 Prateek Jain J <pr...@ericsson.com> on 2016/01/28 11:00:47 UTC

enum vs string performance

Hi,

We have some fixed string constants in our application like eventType, sourceEvent etc. We don't have requirement of partial/wildcard search on these fields. Will there be any performance gain while inserting or querying if, we take their fieldType as EnumField in solr?


Regards,
Prateek Jain
Team: Totoro
Mobile: +353 894 391716


Re: enum vs string performance

Posted by Alessandro Benedetti <ab...@apache.org>.
Taking a look to the documentation the EnumField type seems more related
the possibility of configuring a custom default sort order instead of the
lexographic one.
When you say "any performance gain" what do you mean ?
performance gain accomplishing which tasks ?
Space/time performance gain ?

At index time you will need to store the same binary information, pretty
sure the compression algorithm used will be the same of normal Strings.
At query time, you produced an inverted index so the behaviour will be
pretty much the same.
What are the kind of benefits you want than the string field can not
provide ?
Which are the most common operation you carry out ?

Cheers


On 28 January 2016 at 10:00, Prateek Jain J <pr...@ericsson.com>
wrote:

>
> Hi,
>
> We have some fixed string constants in our application like eventType,
> sourceEvent etc. We don't have requirement of partial/wildcard search on
> these fields. Will there be any performance gain while inserting or
> querying if, we take their fieldType as EnumField in solr?
>
>
> Regards,
> Prateek Jain
> Team: Totoro
> Mobile: +353 894 391716
>
>


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

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