Hi Mingz,

If you use Eclipse, you can debug Solr with your plugin like this:

# go to Solr install directory
$ cd $SOLR
$ ant run-example -Dexample.debug=true

Then connect the JVM from Eclipse via remote debug port 5005.

Good luck!

koji


(13/10/21 18:58), Mingzhu Gao wrote:
More information about this , the custom analyzer just implement
"createComponents" of Analyzer.

And my configure in schema.xml is just something like :

<fieldType name="text_cn" class="solr.TextField" >
  <analyzer class="my.package.CustomAnalyzer" />
</fieldType>


From the log I cannot see any error information , however , when I want to
analysis or add document data , it always hang there .

Any way to debug or narrow down the problem ?

Thanks in advance .

-Mingz

On 10/21/13 4:35 PM, "Mingzhu Gao" <m...@adobe.com> wrote:

Dear solr expert ,

I would like to write my own analyser ( Chinese analyser ) and integrate
them into solr as solr plugin .

From the log information , the custom analyzer can be loaded into solr
successfully .  I define my <fieldType> with this custom analyzer.

Now the problem is that ,  when I try this analyzer from
http://localhost:8983/solr/#/collection1/analysis , click the analysis ,
then choose my FieldType , then input some text .
After I click "Analyse Value" button , the solr hang there , I cannot get
any result or response in a few minutes.

I also try to add  some data by "curl
http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml"
, or by "post.sh" in exampledocs folder ,
The same issue , the solr hang there , no result and not response .

Can anybody give me some suggestions on how to debug solr to work with my
own custom analyzer ?

By the way , I write a java program to call my custom analyzer , the
result is okay , for example , the following code can work well .
==============
Analyzer analyzer = new MyAnalyzer() ;

TokenStream ts = analyzer.tokenStream() ;

CharTermAttribute ta = ts.getAttribute(CharTermAttribute.class);

ts.reset();

while (ts.incrementToken()){

System.out.println(ta.toString());

}

=============


Thanks,

-Mingz





--
http://soleami.com/blog/automatically-acquiring-synonym-knowledge-from-wikipedia.html

Reply via email to