I've installed Carrot2 on a web application. I send a search with differents options like : number of expected results, depth level. I launch dcs (port 8080) and execute my search (for the moment i'm using wamp on localhost). I init a new Carro2Processor with baseurl : http://localhost:8080/dcs/rest
$source = 'etools';
$query = 'myquery';
$algorithm = 'lingo3g';
$processor = new Carrot2Processor();
$job = new Carrot2Job();
$job->setSource($source);
$job->setQuery($query);
$job->setAlgorithm($algorithm);
I send my attributs with setAttributs() :number of expected results and depth level
try {
$result = $processor->cluster($job);
}
This is my error on my browser :
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
Has anyone encountered this problem ? Thanks (I forgot : I don't have any error log in my apache or php(wamp))
It appears that the recent release renamed the etools
document source to web
without updating code examples. If you change $source = 'etools'
to $source = 'web'
, you should see some results.