New to ElasticSearch

Hello Group,
Hello Shay,

i'm currently looking for an alternative to SOLR, as SOLRs java api
SOLRJ is more a mess than useful. As a typical newbie, I got a few
questions that I couldn't answer myself by looking at the doc's.

  1. Does ElasticSearch offer Faceting?
    I looked at Query DSL doc but didn't see any faceting there;

  2. How can I implement tree structures with ES?
    in SOLR, one can use a multi-valued field and insert there precompiled
    tree-structures like this:
    0_Root
    1_Root_Foo
    1_Root_Foo2
    2_Root_Foo_Bar
    2_Root_Foo_Bar2
    and then facet over e.g. "1_Root_Foo" - does this work in ES, too?

  3. I prefer to have the search solution sitting next to the webapp in
    the same server - is there any way one can deploy ElasticSearch as a
    war in an JEE Server like Glassfish 3?

Best,

K.B.

K.B.

I can't answer the rest, but I can answer the facets question, yes,

ElasticSearch does support facets:

http://www.elasticsearch.org/guide/reference/api/search/facets/

	- Nick

-----Original Message-----
From: K.B. [mailto:korbinian.bachl@googlemail.com]
Sent: Tuesday, March 01, 2011 11:05 AM
To: users
Subject: new to ElasticSearch

Hello Group,
Hello Shay,

i'm currently looking for an alternative to SOLR, as SOLRs java api
SOLRJ is more a mess than useful. As a typical newbie, I got a few
questions that I couldn't answer myself by looking at the doc's.

  1. Does ElasticSearch offer Faceting?
    I looked at Query DSL doc but didn't see any faceting there;

  2. How can I implement tree structures with ES?
    in SOLR, one can use a multi-valued field and insert there precompiled
    tree-structures like this:
    0_Root
    1_Root_Foo
    1_Root_Foo2
    2_Root_Foo_Bar
    2_Root_Foo_Bar2
    and then facet over e.g. "1_Root_Foo" - does this work in ES, too?

  3. I prefer to have the search solution sitting next to the webapp in
    the same server - is there any way one can deploy ElasticSearch as a
    war in an JEE Server like Glassfish 3?

Best,

K.B.

Hi KB

  1. How can I implement tree structures with ES?
    in SOLR, one can use a multi-valued field and insert there precompiled
    tree-structures like this:
    0_Root
    1_Root_Foo
    1_Root_Foo2
    2_Root_Foo_Bar
    2_Root_Foo_Bar2
    and then facet over e.g. "1_Root_Foo" - does this work in ES, too?

Yes you can.

You could just store your tree as eg:
{
ancestors: ["0_Root", "1_Root_Foo", ...etc ]
}

Or if you have unique IDs, where (1 is the parent of 2, is the parent of
5)

{
ancestor_ids: [1,2,5]
}

  1. I prefer to have the search solution sitting next to the webapp in
    the same server - is there any way one can deploy Elasticsearch as a
    war in an JEE Server like Glassfish 3?

Don't know about this, not a Java guy, but I think probably not. You
can certainly have your Java client join the cluster as a non-data node,
but integrating the whole ES server into your app server kinda defeats
the object of scalability

clint

Heya,

Just to add to clinton comment on JEE server, you can start ES embedded in your app server (not as a client, but as a full embedded (non client) node in the cluster). But, I would have run it as a standalone server myself and connect to it using a node client.

-shay.banon
On Tuesday, March 1, 2011 at 6:18 PM, Clinton Gormley wrote:

Hi KB

  1. How can I implement tree structures with ES?
    in SOLR, one can use a multi-valued field and insert there precompiled
    tree-structures like this:
    0_Root
    1_Root_Foo
    1_Root_Foo2
    2_Root_Foo_Bar
    2_Root_Foo_Bar2
    and then facet over e.g. "1_Root_Foo" - does this work in ES, too?

Yes you can.

You could just store your tree as eg:
{
ancestors: ["0_Root", "1_Root_Foo", ...etc ]
}

Or if you have unique IDs, where (1 is the parent of 2, is the parent of
5)

{
ancestor_ids: [1,2,5]
}

  1. I prefer to have the search solution sitting next to the webapp in
    the same server - is there any way one can deploy Elasticsearch as a
    war in an JEE Server like Glassfish 3?

Don't know about this, not a Java guy, but I think probably not. You
can certainly have your Java client join the cluster as a non-data node,
but integrating the whole ES server into your app server kinda defeats
the object of scalability

clint

yeah, I'm running ES separate too.
You also have the benefit that you can just reload the application and
do not waste time or CPU for ES re-initialization.

And I'm really not sure what happens when you reload while ES is
running embedded :slight_smile:

Regards,
Peter.

On 1 Mrz., 19:47, Shay Banon shay.ba...@elasticsearch.com wrote:

Heya,

Just to add to clinton comment on JEE server, you can start ES embedded in your app server (not as a client, but as a full embedded (non client) node in the cluster). But, I would have run it as a standalone server myself and connect to it using a node client.

-shay.banon

On Tuesday, March 1, 2011 at 6:18 PM, Clinton Gormley wrote:

Hi KB

  1. How can I implement tree structures with ES?
    in SOLR, one can use a multi-valued field and insert there precompiled
    tree-structures like this:
    0_Root
    1_Root_Foo
    1_Root_Foo2
    2_Root_Foo_Bar
    2_Root_Foo_Bar2
    and then facet over e.g. "1_Root_Foo" - does this work in ES, too?

Yes you can.

You could just store your tree as eg:
{
ancestors: ["0_Root", "1_Root_Foo", ...etc ]
}

Or if you have unique IDs, where (1 is the parent of 2, is the parent of
5)

{
ancestor_ids: [1,2,5]
}

  1. I prefer to have the search solution sitting next to the webapp in
    the same server - is there any way one can deploy Elasticsearch as a
    war in an JEE Server like Glassfish 3?

Don't know about this, not a Java guy, but I think probably not. You
can certainly have your Java client join the cluster as a non-data node,
but integrating the whole ES server into your app server kinda defeats
the object of scalability

clint

Thank you all for your responses!

A short follow up: I now also understand the doc's better - it's quite
irritating to me that under http://www.elasticsearch.org/guide/ ->
Query the link goes to http://www.elasticsearch.org/guide/reference/query-dsl/
that then shows much less information about queries compared to
http://www.elasticsearch.org/guide/reference/api/search/ - meaning I
nearly would have posted another question regarding field-selecting
because I didn't find the information I epxected in the doc's.

One thing that finally puzzles me a bit: how is the performance of ES
whne queried from Java? SORL was quite OK as the results weren't
transformed into any special format but beeing more pushed within the
JVM's memory around - how does ES stand here?

Best,

Korbinian