solr.KeywordTokenizerFactory does not work with wildcard and space

406 views Asked by At

My schema.xml has the below field type:

    <fieldType name="string_searchable" class="solr.TextField">
        <analyzer type="index">
            <tokenizer class="solr.KeywordTokenizerFactory"/>
            <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
        <analyzer type="query">
            <tokenizer class="solr.KeywordTokenizerFactory"/>
            <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
    </fieldType>

<field name="pub_title" type="string_searchable" indexed="true" stored="true"  multiValued="true"/>

Below data is present in one of the facet (without double quotes): pub_title:"Current Concept on the Classification and Treatment of Spondylolisthesis"

I am firing the below query on solr query console in q and I am getting no results:

pub_title:*Treatment of Spondylolisthesis*

When I try to search using the below q parameter, it works, but the search operation takes twice longer:

pub_title:*Treatment\ of\ Spondylolisthesis*

I want to have a facet with the complete string (without double quotes) "Current Concept on the Classification and Treatment of Spondylolisthesis". I also need highlighting on this field.

I tried using solr.StandardTokenizerFactory, but facets were tokenized.

Please let me know where I am going wrong.

Thanks, Pranay

0

There are 0 answers