1

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))

Potter
  • 25
  • 4

1 Answers1

0

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.

Stanislaw Osinski
  • 1,231
  • 1
  • 7
  • 9
  • Thanks a lot. Like you said i replaced 'etools' by 'web'. I have a new error but this is a big step in the right direction. This new error says : 'Unknown component id: Lingo3g'. So i commented my algorithm variable and it works perfectly. It's strange to comment the algoritm but it seems like 'carrot2' doesn't need it anymore (or not..). Thanks again – Potter Nov 29 '17 at 13:46
  • Lingo3G is a commercially available clustering algorithm, available for a [free trial](https://carrotsearch.com/lingo3g/free-trial/). The open source algorithms contained in Carrot2 are `lingo` and `stc`. – Stanislaw Osinski Nov 30 '17 at 16:22
  • Thank you for your answers and explanations. Everything works perfectly – Potter Dec 01 '17 at 10:10