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 James liu <li...@gmail.com> on 2006/08/27 09:27:28 UTC

about analyzer and index

lucene have ChineseAnalyzer and CJKAnalyzer,,,so i can search chinese
keyword with it.

solr have it? if not, how can i add it?


if i use php+mysql build  data.xml,,,use post.sh data.xml? it is the only
way to index?


i remember i must use same analyzer to index and search when i use lucene2.0
,,,

what is solr analyzer? and how support user defined?(if it not support
chinese)

Re: about analyzer and index

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Aug 27, 2006, at 3:27 AM, James liu wrote:
> lucene have ChineseAnalyzer and CJKAnalyzer,,,so i can search chinese
> keyword with it.
>
> solr have it? if not, how can i add it?

Those analyzers are not part of the core Solr distribution, but you  
can add them easily by getting the JAR file from Lucene (it'll be  
called lucene-analyzers-<version>.jar) in the Lucene binary  
downloads.  You'll then need to adjust your schema.xml to point at  
the analyzer you wish to use, something like this:

     <fieldtype name="text_lu" class="solr.TextField">
       <analyzer  
class="org.apache.lucene.analysis.snowball.SnowballAnalyzer"/>
     </fieldType>

> if i use php+mysql build  data.xml,,,use post.sh data.xml? it is  
> the only
> way to index?

No, not at all.  Solr works off XML over HTTP, which is trivial to do  
from PHP and other environments.  Check out the wiki here:  <http:// 
wiki.apache.org/solr/SolPHP>

	Erik