2017-11-27 4 views
1

キャロット2をWebアプリケーションにインストールしました。私は期待される結果の数、深さのレベルのような異なるオプションで検索を送る。 私はdcs(ポート8080)を起動し、私の検索を実行します(私はlocalhostでwampを使っています)。 私はBASEURLで新しいCarro2Processor INIT:)私は(setAttributsと私のattributsを送信http://localhost:8080/dcs/restキャロット2 dcsエラー500

$source = 'etools'; 
$query = 'myquery'; 
$algorithm = 'lingo3g'; 
$processor = new Carrot2Processor(); 
$job = new Carrot2Job(); 
$job->setSource($source); 
$job->setQuery($query); 
$job->setAlgorithm($algorithm); 

を:期待される結果の数と深さレベル

try { 
    $result = $processor->cluster($job); 
} 

は、これは私のブラウザ上で私のエラーです:

C:\wamp64\www\lingo3g-php-search\model\Carrot2.php:239:string '<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> 
<title>Error 500 Server Error</title> 
</head> 
<body><h2>HTTP ERROR 500</h2> 
<p>Problem accessing /dcs/rest. Reason: 
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalArgumentException: Unknown component id: etools 
    at org.carrot2.core.Controller.resolveComponent(Controller.java:476) 
    at org.carrot2.core.Controller.process(Controller.java:316) 
    at org.carrot2.core.Controller.process(Controller.jav'... (length=4057) 
An error occurred during processing: HTTP error occurred, error code: 500 

誰でもこの問題が発生しましたか?おかげ (私は忘れてしまった:私は私のApacheやPHP(WAMP)のいずれかのエラーログを持っていない)

答えて

0

最近のリリースがコード例を更新せずwebetoolsドキュメント・ソースの名前を変更していることが表示されます。 $source = 'etools'$source = 'web'に変更すると、いくつかの結果が表示されます。

+0

ありがとうございました。あなたは私が 'etools'を 'web'に置き換えたと言ったように。私は新しいエラーがありますが、これは正しい方向に大きなステップです。この新しいエラーでは、「不明なコンポーネントID:Lingo3g」と表示されます。だから私はアルゴリズムの変数をコメントし、それは完全に動作します。アルゴリズムをコメントするのは奇妙ですが、 'carrot2'はそれをもう必要としない(またはそうではありません)ようです。ありがとうございます – Potter

+0

Lingo3Gは市販のクラスタリングアルゴリズムで、[無料試用版](https://carrotsearch.com/lingo3g/free-trial/)で利用できます。 Carrot2に含まれるオープンソースのアルゴリズムは 'lingo'と' stc'です。 –

+0

あなたの答えと説明をありがとう。 すべてが完璧に動作します – Potter