lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: about analyzer and index
Date Sun, 27 Aug 2006 10:24:44 GMT

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




Mime
View raw message