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 Daniel Brügge <da...@googlemail.com> on 2012/01/30 17:44:48 UTC

Index-Analyzer on Master with StopFilterFactory and Query-Analyzer on Slave with StopFilterFactory

Hi,

I am using a 'text_general' fieldType (class = solr.TextField) in my
schema. And I have a master/slave setup,
where I index on the master and read from the slaves. In the text_general
field I am using 2 analyzers. One for
indexing and one for querying with stopword-filters.

What I am thinking is if it would make sense to have a different schema on
the master than on the slave? So just the
index-analyzer on the master's schema and the query-analyzer on the slave's
schema?


<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100">
 <analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
 <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt, stopwords_en.txt" enablePositionIncrements="true" />
 <filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
 <analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
 <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt, stopwords_en.txt" enablePositionIncrements="true" />
 <filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
 </fieldType>

What do you think?

Thanks & best regards

Daniel

Re: Index-Analyzer on Master with StopFilterFactory and Query-Analyzer on Slave with StopFilterFactory

Posted by Daniel Brügge <da...@googlemail.com>.
OK, thanks Erick. Then I won't touch it. I was just wondering, if it would
make sense. But on the other hand the schema.xml is also replicated in my
setup, so maybe it's really confusing.

Thanks

Daniel

On Tue, Jan 31, 2012 at 3:07 PM, Erick Erickson <er...@gmail.com>wrote:

> I think it would be easy to get confused about what
> was where, resulting in hard-to-track bugs because
> the config file wasn't what you were expecting. I also
> don't understand why you think this is desirable.
> There might be an infinitesimal savings in memory,
> due to not instantiating one analysis chain, but I'm not
> even sure about that.
>
> The savings is so tiny that the increased risk of
> messing up seems far too high a price to pay.
>
> Best
> Erick
>
> On Mon, Jan 30, 2012 at 11:44 AM, Daniel Brügge
> <da...@googlemail.com> wrote:
> > Hi,
> >
> > I am using a 'text_general' fieldType (class = solr.TextField) in my
> > schema. And I have a master/slave setup,
> > where I index on the master and read from the slaves. In the text_general
> > field I am using 2 analyzers. One for
> > indexing and one for querying with stopword-filters.
> >
> > What I am thinking is if it would make sense to have a different schema
> on
> > the master than on the slave? So just the
> > index-analyzer on the master's schema and the query-analyzer on the
> slave's
> > schema?
> >
> >
> > <fieldType name="text_general" class="solr.TextField"
> > positionIncrementGap="100">
> >  <analyzer type="index">
> > <tokenizer class="solr.StandardTokenizerFactory"/>
> >  <filter class="solr.StopFilterFactory" ignoreCase="true"
> > words="stopwords.txt, stopwords_en.txt" enablePositionIncrements="true"
> />
> >  <filter class="solr.LowerCaseFilterFactory"/>
> > </analyzer>
> >  <analyzer type="query">
> > <tokenizer class="solr.StandardTokenizerFactory"/>
> >  <filter class="solr.StopFilterFactory" ignoreCase="true"
> > words="stopwords.txt, stopwords_en.txt" enablePositionIncrements="true"
> />
> >  <filter class="solr.LowerCaseFilterFactory"/>
> > </analyzer>
> >  </fieldType>
> >
> > What do you think?
> >
> > Thanks & best regards
> >
> > Daniel
>

Re: Index-Analyzer on Master with StopFilterFactory and Query-Analyzer on Slave with StopFilterFactory

Posted by Erick Erickson <er...@gmail.com>.
I think it would be easy to get confused about what
was where, resulting in hard-to-track bugs because
the config file wasn't what you were expecting. I also
don't understand why you think this is desirable.
There might be an infinitesimal savings in memory,
due to not instantiating one analysis chain, but I'm not
even sure about that.

The savings is so tiny that the increased risk of
messing up seems far too high a price to pay.

Best
Erick

On Mon, Jan 30, 2012 at 11:44 AM, Daniel Brügge
<da...@googlemail.com> wrote:
> Hi,
>
> I am using a 'text_general' fieldType (class = solr.TextField) in my
> schema. And I have a master/slave setup,
> where I index on the master and read from the slaves. In the text_general
> field I am using 2 analyzers. One for
> indexing and one for querying with stopword-filters.
>
> What I am thinking is if it would make sense to have a different schema on
> the master than on the slave? So just the
> index-analyzer on the master's schema and the query-analyzer on the slave's
> schema?
>
>
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100">
>  <analyzer type="index">
> <tokenizer class="solr.StandardTokenizerFactory"/>
>  <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt, stopwords_en.txt" enablePositionIncrements="true" />
>  <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
>  <analyzer type="query">
> <tokenizer class="solr.StandardTokenizerFactory"/>
>  <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt, stopwords_en.txt" enablePositionIncrements="true" />
>  <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
>  </fieldType>
>
> What do you think?
>
> Thanks & best regards
>
> Daniel