Suggester plug-in


(Renad Ahmed) #1

I'm using play framework and i've already intalled it and downloaded
the suggester plug in from https://github.com/codere/elasticsearch-suggest-plugin

put i don't know how to install it, i know it is supposed to be an
easy task but i'm a newbie in play and elasticsearch.


(David Pilato) #2

IMO, if you have install the plugin (command like bin/plugin -install ...), you just need to start Elasticsearch and see in logs if the plugin is discovered by ES.

Is it what you are meaning by "how to install it" ?

David :wink:
Twitter : @dadoonet / @elasticsearchfr

Le 20 avr. 2012 à 02:16, Renad renad.ahmed23@gmail.com a écrit :

I'm using play framework and i've already intalled it and downloaded
the suggester plug in from https://github.com/codere/elasticsearch-suggest-plugin

put i don't know how to install it, i know it is supposed to be an
easy task but i'm a newbie in play and elasticsearch.


(Alexander Reelsen) #3

Hi all,

On 20 Apr., 06:53, David Pilato da...@pilato.fr wrote:

IMO, if you have install the plugin (command like bin/plugin -install ...), you just need to start Elasticsearch and see in logs if the plugin is discovered by ES.

Is it what you are meaning by "how to install it" ?
I am assuming in the following you are using playframework 1.2.x and
Felipes elasticsearch module. This also means, you are using
elasticsearch 0.18.x

After running play deps to install the elasticsearch module download
the corresponding elasticsearch-suggest plugin from
https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip

The unzip the contents of the zip file into the lib/ directory of your
play application (three jars, one plugin jar and two lucene
libraries.)

Start your play application, go to http://localhost:9000 and check the
output of your play application, it should show something like this:

09:15:18,559 INFO ~ Listening for HTTP on port 9000 (Waiting a first
request to start) ...
09:15:26,230 INFO ~ Starting Elastic Search for Play! in Local Mode
09:15:26,305 INFO ~ [Living Tribunal] {0.18.5}[54831]:
initializing ...
09:15:26,314 INFO ~ [Living Tribunal] loaded [suggest], sites []

At the last line you can see, that the suggest plugin has loaded
successfully inside your play application and you can use it like in
any standalone application.

Hope this helps...

--Alexander


(Renad Ahmed) #4

Hi all,

Alexander,

On Fri, Apr 20, 2012 at 9:21 AM, Alexander Reelsen <
alexander.reelsen@googlemail.com> wrote:

Hi all, thank you. Yes i'm using play 1.2.4 and elastic search 0.4. i've
done all the steps and downloaded it and when i started to save and unzip
it in my application lib/ i found no folders at all it was an empty folder
named lib/, so still i unzipped it there. (i mean i didn't ind the 3 jars
so i unzipped it in lib/ of my application which is named code)

when i started running it i got this error,
Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

On 20 Apr., 06:53, David Pilato da...@pilato.fr wrote:

IMO, if you have install the plugin (command like bin/plugin -install
...), you just need to start Elasticsearch and see in logs if the plugin is
discovered by ES.

Is it what you are meaning by "how to install it" ?
I am assuming in the following you are using playframework 1.2.x and
Felipes elasticsearch module. This also means, you are using
elasticsearch 0.18.x

After running play deps to install the elasticsearch module download
the corresponding elasticsearch-suggest plugin from

https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip

The unzip the contents of the zip file into the lib/ directory of your
play application (three jars, one plugin jar and two lucene
libraries.)

Start your play application, go to http://localhost:9000 and check the
output of your play application, it should show something like this:

09:15:18,559 INFO ~ Listening for HTTP on port 9000 (Waiting a first
request to start) ...
09:15:26,230 INFO ~ Starting Elastic Search for Play! in Local Mode
09:15:26,305 INFO ~ [Living Tribunal] {0.18.5}[54831]:
initializing ...
09:15:26,314 INFO ~ [Living Tribunal] loaded [suggest], sites []

At the last line you can see, that the suggest plugin has loaded
successfully inside your play application and you can use it like in
any standalone application.

Hope this helps...

--Alexander

--
Best Regards,
Renad Ahmed


(Renad Ahmed) #5

sorry, i've found the 3 jars and now shall i put them in which lib/, is it
of the application i'm creating named code or in the play framework itself?
because it's still raising the same error

Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

On Fri, Apr 20, 2012 at 3:32 PM, Renad Ahmed renad.ahmed23@gmail.comwrote:

Hi all,

Alexander,

On Fri, Apr 20, 2012 at 9:21 AM, Alexander Reelsen <
alexander.reelsen@googlemail.com> wrote:

Hi all, thank you. Yes i'm using play 1.2.4 and elastic search 0.4. i've
done all the steps and downloaded it and when i started to save and unzip
it in my application lib/ i found no folders at all it was an empty folder
named lib/, so still i unzipped it there. (i mean i didn't ind the 3 jars
so i unzipped it in lib/ of my application which is named code)

when i started running it i got this error,
Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

On 20 Apr., 06:53, David Pilato da...@pilato.fr wrote:

IMO, if you have install the plugin (command like bin/plugin -install
...), you just need to start Elasticsearch and see in logs if the plugin is
discovered by ES.

Is it what you are meaning by "how to install it" ?
I am assuming in the following you are using playframework 1.2.x and
Felipes elasticsearch module. This also means, you are using
elasticsearch 0.18.x

After running play deps to install the elasticsearch module download
the corresponding elasticsearch-suggest plugin from

https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip

The unzip the contents of the zip file into the lib/ directory of your
play application (three jars, one plugin jar and two lucene
libraries.)

Start your play application, go to http://localhost:9000 and check the
output of your play application, it should show something like this:

09:15:18,559 INFO ~ Listening for HTTP on port 9000 (Waiting a first
request to start) ...
09:15:26,230 INFO ~ Starting Elastic Search for Play! in Local Mode
09:15:26,305 INFO ~ [Living Tribunal] {0.18.5}[54831]:
initializing ...
09:15:26,314 INFO ~ [Living Tribunal] loaded [suggest], sites []

At the last line you can see, that the suggest plugin has loaded
successfully inside your play application and you can use it like in
any standalone application.

Hope this helps...

--Alexander

--
Best Regards,
Renad Ahmed

--
Best Regards,
Renad Ahmed


(Renad Ahmed) #6

I know I'm sending a lot of emails but i'm a beginner. here is what i
reached i solved the error but still i can't find the suggester jar files
in my project explorer. I'm not sure where shall i unzip it (in the lib/
directory of play framework itself or in the lib/ directory of the
application i'm creating or in that of the elastic search?)

second to use it do i have to add anything in the dependencies.yml or in
the application.config files or a class path or so?

I apologize again for sending many emails but i've been stuck for 2 days
trying to install this plugin.

On Fri, Apr 20, 2012 at 4:57 PM, Renad Ahmed renad.ahmed23@gmail.comwrote:

sorry, i've found the 3 jars and now shall i put them in which lib/, is it
of the application i'm creating named code or in the play framework itself?
because it's still raising the same error

Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

On Fri, Apr 20, 2012 at 3:32 PM, Renad Ahmed renad.ahmed23@gmail.comwrote:

Hi all,

Alexander,

On Fri, Apr 20, 2012 at 9:21 AM, Alexander Reelsen <
alexander.reelsen@googlemail.com> wrote:

Hi all, thank you. Yes i'm using play 1.2.4 and elastic search 0.4. i've
done all the steps and downloaded it and when i started to save and unzip
it in my application lib/ i found no folders at all it was an empty folder
named lib/, so still i unzipped it there. (i mean i didn't ind the 3 jars
so i unzipped it in lib/ of my application which is named code)

when i started running it i got this error,
Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

On 20 Apr., 06:53, David Pilato da...@pilato.fr wrote:

IMO, if you have install the plugin (command like bin/plugin -install
...), you just need to start Elasticsearch and see in logs if the plugin is
discovered by ES.

Is it what you are meaning by "how to install it" ?
I am assuming in the following you are using playframework 1.2.x and
Felipes elasticsearch module. This also means, you are using
elasticsearch 0.18.x

After running play deps to install the elasticsearch module download
the corresponding elasticsearch-suggest plugin from

https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.3-0.18.6.zip

The unzip the contents of the zip file into the lib/ directory of your
play application (three jars, one plugin jar and two lucene
libraries.)

Start your play application, go to http://localhost:9000 and check the
output of your play application, it should show something like this:

09:15:18,559 INFO ~ Listening for HTTP on port 9000 (Waiting a first
request to start) ...
09:15:26,230 INFO ~ Starting Elastic Search for Play! in Local Mode
09:15:26,305 INFO ~ [Living Tribunal] {0.18.5}[54831]:
initializing ...
09:15:26,314 INFO ~ [Living Tribunal] loaded [suggest], sites []

At the last line you can see, that the suggest plugin has loaded
successfully inside your play application and you can use it like in
any standalone application.

Hope this helps...

--Alexander

--
Best Regards,
Renad Ahmed

--
Best Regards,
Renad Ahmed

--
Best Regards,
Renad Ahmed


(Clinton Gormley) #7

Hi Renad
On Fri, 2012-04-20 at 20:02 +0200, Renad Ahmed wrote:

I know I'm sending a lot of emails but i'm a beginner. here is what i
reached i solved the error but still i can't find the suggester jar
files in my project explorer. I'm not sure where shall i unzip it (in
the lib/ directory of play framework itself or in the lib/ directory
of the application i'm creating or in that of the elastic search?)

Are you trying to use the plugin? or change the plugin?

What happened when you tried the instructions on the home page of the
suggest plugin?

I followed those, and it worked for me

clint


(Renad Ahmed) #8

i'm trying to use the plug in but i'm not able to understand how to do it,
i tried to follow the instructions

to add this inside my elasticsearch/bin directory)

bin/plugin -url
https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zi
https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zipp

but i don't know how to access the directory, i tried to follow the
instructions Alexander sent but i'm confused where should i unzip the
folder.

On Fri, Apr 20, 2012 at 8:39 PM, Clinton Gormley clint@traveljury.comwrote:

Hi Renad
On Fri, 2012-04-20 at 20:02 +0200, Renad Ahmed wrote:

I know I'm sending a lot of emails but i'm a beginner. here is what i
reached i solved the error but still i can't find the suggester jar
files in my project explorer. I'm not sure where shall i unzip it (in
the lib/ directory of play framework itself or in the lib/ directory
of the application i'm creating or in that of the elastic search?)

Are you trying to use the plugin? or change the plugin?

What happened when you tried the instructions on the home page of the
suggest plugin?

https://github.com/spinscale/elasticsearch-suggest-plugin

I followed those, and it worked for me

clint

--
Best Regards,
Renad Ahmed


(Clinton Gormley) #9

bin/plugin -url https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zip
but i don't know how to access the directory, i tried to follow the
instructions Alexander sent but i'm confused where should i unzip the
folder.

By running the above command, you have installed the plugin.

Then you restart elasticsearch, and you should see in the log file (look
in logs/) a line saying that it has loaded the suggest plugin.

Then it is ready to use.

If you're still having problems with it, please provide more
information.

clint

On Fri, Apr 20, 2012 at 8:39 PM, Clinton Gormley
clint@traveljury.com wrote:
Hi Renad
On Fri, 2012-04-20 at 20:02 +0200, Renad Ahmed wrote:
> I know I'm sending a lot of emails but i'm a beginner. here
is what i
> reached i solved the error but still i can't find the
suggester jar
> files in my project explorer. I'm not sure where shall i
unzip it (in
> the lib/ directory of play framework itself or in the lib/
directory
> of the application i'm creating or in that of the elastic
search?)

    Are you trying to use the plugin? or change the plugin?
    
    What happened when you tried the instructions on the home page
    of the
    suggest plugin?
    
    https://github.com/spinscale/elasticsearch-suggest-plugin
    
    I followed those, and it worked for me
    
    clint

--
Best Regards,
Renad Ahmed


(Renad Ahmed) #10

this is what i've exactly done:
1- unzipped the folder, found 3 jar files
2- added them to play/modules/elasticsearch-0.4/lib
3- deleted the application and re-imported it again
4- ran the play dependencies in the cmd
5-ran play eclipsify and then ran the application
6- refreshed the http://localhost:9000/http://localhost:9000/search/index
7- got this error
Oops: ObjectExistsException

An unexpected error occured caused by exception ObjectExistsException:
Cache play already exists

when i refresh it again, i get this error

Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

---> For the plugin to run do i've to run anything in the cmd? or what
shall i do? i tried googling the error but i reached a deadend

Thank you very much Clint, I really appreciate your help.

On Sat, Apr 21, 2012 at 2:26 PM, Clinton Gormley clint@traveljury.comwrote:

bin/plugin -url
https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zip
but i don't know how to access the directory, i tried to follow the
instructions Alexander sent but i'm confused where should i unzip the
folder.

By running the above command, you have installed the plugin.

Then you restart elasticsearch, and you should see in the log file (look
in logs/) a line saying that it has loaded the suggest plugin.

Then it is ready to use.

If you're still having problems with it, please provide more
information.

clint

On Fri, Apr 20, 2012 at 8:39 PM, Clinton Gormley
clint@traveljury.com wrote:
Hi Renad
On Fri, 2012-04-20 at 20:02 +0200, Renad Ahmed wrote:
> I know I'm sending a lot of emails but i'm a beginner. here
is what i
> reached i solved the error but still i can't find the
suggester jar
> files in my project explorer. I'm not sure where shall i
unzip it (in
> the lib/ directory of play framework itself or in the lib/
directory
> of the application i'm creating or in that of the elastic
search?)

    Are you trying to use the plugin? or change the plugin?

    What happened when you tried the instructions on the home page
    of the
    suggest plugin?

    https://github.com/spinscale/elasticsearch-suggest-plugin

    I followed those, and it worked for me

    clint

--
Best Regards,
Renad Ahmed

--
Best Regards,
Renad Ahmed


(Renad Ahmed) #11

i've been working on it and trying to follow the steps mentioned here
https://github.com/spinscale/elasticsearch-suggest-plugin --> at the long
version of installation
and at this step
Add a suggest and a lowercase analyzer to your
elasticsearch/config/elasticsearch.yml config file
i didn't find elasticsearch.yml config file in
play1.2.4/modules/elasticsearch-0.4

but the steps here in the link are for elasticsearch 0.19.2 but for play
framework only possible version is 0.4. is there anyway to solve this
problem?

On Sat, Apr 21, 2012 at 3:24 PM, Renad Ahmed renad.ahmed23@gmail.comwrote:

this is what i've exactly done:
1- unzipped the folder, found 3 jar files
2- added them to play/modules/elasticsearch-0.4/lib
3- deleted the application and re-imported it again
4- ran the play dependencies in the cmd
5-ran play eclipsify and then ran the application
6- refreshed the http://localhost:9000/http://localhost:9000/search/index
7- got this error
Oops: ObjectExistsException

An unexpected error occured caused by exception ObjectExistsException:
Cache play already exists

when i refresh it again, i get this error

Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
org/elasticsearch/action/GenericAction

---> For the plugin to run do i've to run anything in the cmd? or what
shall i do? i tried googling the error but i reached a deadend

Thank you very much Clint, I really appreciate your help.

On Sat, Apr 21, 2012 at 2:26 PM, Clinton Gormley clint@traveljury.comwrote:

bin/plugin -url
https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zip
but i don't know how to access the directory, i tried to follow the
instructions Alexander sent but i'm confused where should i unzip the
folder.

By running the above command, you have installed the plugin.

Then you restart elasticsearch, and you should see in the log file (look
in logs/) a line saying that it has loaded the suggest plugin.

Then it is ready to use.

If you're still having problems with it, please provide more
information.

clint

On Fri, Apr 20, 2012 at 8:39 PM, Clinton Gormley
clint@traveljury.com wrote:
Hi Renad
On Fri, 2012-04-20 at 20:02 +0200, Renad Ahmed wrote:
> I know I'm sending a lot of emails but i'm a beginner. here
is what i
> reached i solved the error but still i can't find the
suggester jar
> files in my project explorer. I'm not sure where shall i
unzip it (in
> the lib/ directory of play framework itself or in the lib/
directory
> of the application i'm creating or in that of the elastic
search?)

    Are you trying to use the plugin? or change the plugin?

    What happened when you tried the instructions on the home page
    of the
    suggest plugin?

    https://github.com/spinscale/elasticsearch-suggest-plugin

    I followed those, and it worked for me

    clint

--
Best Regards,
Renad Ahmed

--
Best Regards,
Renad Ahmed

--
Best Regards,
Renad Ahmed


(Alexander Reelsen) #12

Hi

clearly you did not run "play deps" when you got the
ClassNotFoundError

On 21 Apr., 21:50, Renad Ahmed renad.ahme...@gmail.com wrote:

but the steps here in the link are for elasticsearch 0.19.2 but for play
framework only possible version is 0.4. is there anyway to solve this
problem?
Please take yourself the time and understand the differences between
the play framework elasticsearch module and the elasticsearch itself
(and its versions).

You can connect to an external elasticsearch instance using the play
framework elasticsearch module (check the documentation at
http://www.playframework.org/modules/elasticsearch-0.4/home) - you
should do that instead of mixing two technologies, as this keeps
things simpler, especially as I do not know if it is possible to
specifiy an external configuration file using the elasticsearch play
framework module.

--Alexander


(system) #13