1
votes

I have added a text field in solr to support case-insensitive search as below:

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

and defined a field:

<field name="accountname" type="lower_text" indexed="true" stored="true" required="false"/>

I have been having facet performance and indexing becoming large in size. To improve facet and sort performance, I want to implement docValues and streaming aggregations. .

Solr does not really allow me to add docValues option to Text field and my only option looks like is to have a secondary field , one for lower case text and one string for doc values.

Can we apply docValues to text fields? Can we search String with case in-sensitive feature? If I support both docValues and in-sensitive by adding 2 fields as suggested, what happens to my index size?

FYI: I have already added export functionality to my solrconfig.xml and my solr server. Version is solr 4.10.3 CDH 5.5.4

1

1 Answers

1
votes

Solr does not currently support DocValues for analyzed fields. There is a JIRA on the issue, but it is not trivial to solve it: https://issues.apache.org/jira/browse/SOLR-8362

Having two parallel fields (using the copyField mechanism), one for search, one for faceting, is the way to go for now. Your index size will grow a bit, as there is no re-use between indexed and DocValued terms.