Hi,

Create a copy field as below and use this copyfield in your query..

<copyField source="_name" dest="itemFullName"/>
  <field name="itemFullName" type="itemFullName_type" stored="true" 
indexed="true" termVectors="true" termPositions="true" termOffsets="true"/>

<fieldType name="itemFullName_type" class="solr.TextField" 
sortMissingLast="true" omitNorms="true" positionIncrementGap="100" 
multiValued="false">
    <analyzer type="index">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt" 
ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt" 
ignoreCase="true"/>
      <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" 
synonyms="synonyms.txt"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
  </fieldType>

Thanks,
Thamizh


-----Original Message-----
From: son hoang <sonhoan...@gmail.com>
Sent: Thursday, October 21, 2021 8:19 AM
To: users@solr.apache.org
Subject: Index for text with space

Caution: This email came from outside Kaiser Permanente. Do not open 
attachments or click on links if you do not recognize the sender.

______________________________________________________________________
Hello

I have a config like this:

<fieldtype name="tok" class="solr.TextField" positionIncrementGap="100">
            <analyzer type="index">
                <tokenizer class="solr.StandardTokenizerFactory"/>
                <filter class="solr.ASCIIFoldingFilterFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="3"
maxGramSize="15"/>
            </analyzer>
            <analyzer type="query">
                <tokenizer class="solr.StandardTokenizerFactory" />
                <filter class="solr.ASCIIFoldingFilterFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
        <!-- <filter class="solr.EdgeNGramFilterFactory" minGramSize="3"
maxGramSize="15"/> -->
            </analyzer>
    </fieldtype>

Using this config:

1. When I search for "Abbas", the result for "Al Abbas" appears.

2. When I search for "Al Abbas" in the search field, I get no results.

It seems that "Al Abbas" is not indexed. What I should do in the config so #2 
can return the result

Many thanks
NOTICE TO RECIPIENT:  If you are not the intended recipient of this e-mail, you 
are prohibited from sharing, copying, or otherwise using or disclosing its 
contents.  If you have received this e-mail in error, please notify the sender 
immediately by reply e-mail and permanently delete this e-mail and any 
attachments without reading, forwarding or saving them. v.173.295  Thank you.

Reply via email to