[QA-search] About field setting

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[QA-search] About field setting

유정인
hi
Can you use multiple query analyzers to search for or?

Ex)

<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100" multiValued="true">

    <analyzer type="index">

      <tokenizer class="solr.StandardTokenizerFactory"/>

      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>

      <filter class="solr.LowerCaseFilterFactory"/>

    </analyzer>

    <analyzer type="query">

      <tokenizer class="solr.StandardTokenizerFactory"/>

      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>

      <filter class="solr.LowerCaseFilterFactory"/>    

    </analyzer>

    <analyzer type="query">

      <tokenizer class="solr.StandardTokenizerFactory"/>

      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>

      <filter class="solr.SynonymGraphFilterFactory" expand="true"
ignoreCase="true" synonyms="synonyms.txt"/>

      <filter class="solr.LowerCaseFilterFactory"/>    

    </analyzer>  

</fieldType>

 

Can you get synonyms to run before tokenzier?

Ex)

<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100" multiValued="true">

    <analyzer type="index">

      <tokenizer class="solr.StandardTokenizerFactory"/>

      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>

      <filter class="solr.LowerCaseFilterFactory"/>

    </analyzer>

<analyzer type="query">

       <filter class="solr.SynonymGraphFilterFactory" expand="true"
ignoreCase="true" synonyms="synonyms.txt"/>

      <tokenizer class="solr.StandardTokenizerFactory"/>

      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>

<filter class="solr.LowerCaseFilterFactory"/>    

    </analyzer>  

</fieldType>

 

 

thanks

Reply | Threaded
Open this post in threaded view
|

Re: [QA-search] About field setting

Scott Stults
No, you have to tokenize before you filter, but the Keyword tokenizer
outputs the whole input text as a single token.

On Thu, Jan 17, 2019 at 11:36 PM 유정인 <[hidden email]> wrote:

> hi
> Can you use multiple query analyzers to search for or?
>
> Ex)
>
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100" multiValued="true">
>
>     <analyzer type="index">
>
>       <tokenizer class="solr.StandardTokenizerFactory"/>
>
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>
>       <filter class="solr.LowerCaseFilterFactory"/>
>
>     </analyzer>
>
>     <analyzer type="query">
>
>       <tokenizer class="solr.StandardTokenizerFactory"/>
>
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>
>       <filter class="solr.LowerCaseFilterFactory"/>
>
>     </analyzer>
>
>     <analyzer type="query">
>
>       <tokenizer class="solr.StandardTokenizerFactory"/>
>
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>
>       <filter class="solr.SynonymGraphFilterFactory" expand="true"
> ignoreCase="true" synonyms="synonyms.txt"/>
>
>       <filter class="solr.LowerCaseFilterFactory"/>
>
>     </analyzer>
>
> </fieldType>
>
>
>
> Can you get synonyms to run before tokenzier?
>
> Ex)
>
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100" multiValued="true">
>
>     <analyzer type="index">
>
>       <tokenizer class="solr.StandardTokenizerFactory"/>
>
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>
>       <filter class="solr.LowerCaseFilterFactory"/>
>
>     </analyzer>
>
> <analyzer type="query">
>
>        <filter class="solr.SynonymGraphFilterFactory" expand="true"
> ignoreCase="true" synonyms="synonyms.txt"/>
>
>       <tokenizer class="solr.StandardTokenizerFactory"/>
>
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>
> <filter class="solr.LowerCaseFilterFactory"/>
>
>     </analyzer>
>
> </fieldType>
>
>
>
>
>
> thanks
>
>

--
Scott Stults | Founder & Solutions Architect | OpenSource Connections, LLC
| 434.409.2780
http://www.opensourceconnections.com