Analysis is called when creating the indexed data for content, but not
when storing the content.
CopyField copies one field's raw values to another field for storage.
The source and target fields can be of any type.

<copyField> does not analyse the source data and then feed it to
another field's analyzer stack. You will have to copy the raw data and
add you analyzer to the existing analyzer stack for the target field.

On Tue, Jan 5, 2010 at 2:56 PM, MitchK <mitc...@web.de> wrote:
>
> Hello community,
>
> I wrote another mail today, but I think something goes wrong (I can't find
> my post in the mailinglist) - if not, I am sorry for posting a "doublepost"
> - I am using a maillist for the first time.
>
> I have created a custom analyzer, which contains on a LowerCaseTokenizer, a
> StopFilter and a custom TestFilter. The analyzer works as expected, when I
> test him with analysis.jsp.
>
> However, it does not work, when I try to index or query real data via
> post.jar.
> I use the analyzer for a testField. This testField gets it's value via
> copyfield from the nameField's value.
> I am speculating that Solr only does copy the value without analyzing it
> afterwards.
>
> Here is some xml from my schema:
> The field:
> <copyField source="name" dest="test"/>
> <field name="test" type="testAnalyzer" indexed="true" stored="true"/>
>
> The analyzer:
> <fieldType name="testAnalyzer" class="solr.TextField"
> positionIncrementGap="100">
> <analyzer>
> <tokenizer class = "solr.LowerCaseTokenizerFactory" />
> <filter class="solr.StopFilterFactory"
> ignoreCase="true"
> words="stopwords.txt"
> enablePositionIncrements="true"
> />
> <filter class = "my.package.solr.analysis.TestFilterFactory"
> mode = "Main"
> />
> </analyzer>
> </fieldType>
>
> How can I force Solr to use my analyzer the way it does, when I test him
> with analysis.jsp?
> Restart and re-indexing does not solve the problem.
>
> Hopefully you can help me with this.
> Thank you!
>
> Kind regards from Germany
> Mitch
> --
> View this message in context: 
> http://old.nabble.com/Custom-Analyzer-Tokenizer-works-but-results-were-not-saved-tp27026739p27026739.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to