Help for an ES noob?


(rcariens) #1

Ahoy ahoy,

I'm really interested in ElasticSearch but I'm having some trouble.
Specifically:

  • I'm trying to write some tests that drive the API (mostly for my own
    discovery and understanding), but can't find the javadocs online, in the
    download, or when I build the distribution.
  • I get runtime exceptions when I use the Groovy API per the guide [1].
  • I can build a local distribution (running "gradlew"), but running any
    gradle target fails [2].

My setup is: Mac OS X 10.5.8, ElasticSearch 0.16.2, gradle 0.8, groovy 1.7,
Java 1.6.0_24_blah-blah.

I'll keep snooping around and tinkering, and thanks in advance for any help
you can provide!

Best,
Rich

[1] - This code:

-snip-

    GNodeBuilder nodeBuilder = nodeBuilder()

    nodeBuilder.settings {

        node {

            client = true

        }

        cluster {

            name = "test"

        }

    }
    node = nodeBuilder.node()

-snip-

results in this exception at runtime:

groovy.lang.MissingMethodException: No signature of method: static
org.elasticsearch.common.xcontent.XContentFactory.contentBinaryBuilder() is
applicable for argument types:
(org.elasticsearch.common.xcontent.XContentType$1) values: [JSON]
at
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1360)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1346)
at
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:35)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:63)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes$0.callCurrent(Unknown
Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:59)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes.call(Unknown
Source)
...

[2] - elasticsearch-elasticsearch-abfc7f0$ gradle -S

FAILURE: Build failed with an exception.

  • Where:
    Build file 'elasticsearch-elasticsearch-abfc7f0/build.gradle' line: 5

  • What went wrong:
    A problem occurred evaluating root project 'elasticsearch-root'.
    Cause: Could not find method apply() for arguments [{plugin=base}] on root
    project 'elasticsearch-root'.


(Shay Banon) #2

Are you sure you are using the correct version? I think you got things mixed up, teh groovy code you are running is not 0.16.2. Why not use directly the 0.16.2 distribution?

On Sunday, June 5, 2011 at 12:45 AM, Rich Cariens wrote:

Ahoy ahoy,

I'm really interested in ElasticSearch but I'm having some trouble. Specifically:
I'm trying to write some tests that drive the API (mostly for my own discovery and understanding), but can't find the javadocs online, in the download, or when I build the distribution.
I get runtime exceptions when I use the Groovy API per the guide [1].
I can build a local distribution (running "gradlew"), but running any gradle target fails [2].

My setup is: Mac OS X 10.5.8, ElasticSearch 0.16.2, gradle 0.8, groovy 1.7, Java 1.6.0_24_blah-blah.

I'll keep snooping around and tinkering, and thanks in advance for any help you can provide!

Best,
Rich

[1] - This code:

-snip-
GNodeBuilder nodeBuilder = nodeBuilder()
nodeBuilder.settings {
node {
client = true
}
cluster {
name = "test"
}
}
node = nodeBuilder.node()
-snip-

results in this exception at runtime:

groovy.lang.MissingMethodException: No signature of method: static org.elasticsearch.common.xcontent.XContentFactory.contentBinaryBuilder() is applicable for argument types: (org.elasticsearch.common.xcontent.XContentType$1) values: [JSON]
at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1360)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1346)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:35)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:63)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes$0.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:59)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes.call(Unknown Source)
...

[2] - elasticsearch-elasticsearch-abfc7f0$ gradle -S

FAILURE: Build failed with an exception.

  • Where:
    Build file 'elasticsearch-elasticsearch-abfc7f0/build.gradle' line: 5

  • What went wrong:
    A problem occurred evaluating root project 'elasticsearch-root'.
    Cause: Could not find method apply() for arguments [{plugin=base}] on root project 'elasticsearch-root'.


(rcariens) #3

Yes, I'm sure I'm using the 0.16.2 distro (the 0.16.2 jar is on my
classpath). That said, the groovy snippet below is directly from the Groovy
API pagehttp://www.elasticsearch.org/guide/reference/groovy-api/client.htmlon
the ES website.

Perhaps I just need access to the latest javadocs/groovydocs. Are they
published somewhere?

On Sat, Jun 4, 2011 at 6:01 PM, Shay Banon shay.banon@elasticsearch.comwrote:

Are you sure you are using the correct version? I think you got things
mixed up, teh groovy code you are running is not 0.16.2. Why not use
directly the 0.16.2 distribution?

On Sunday, June 5, 2011 at 12:45 AM, Rich Cariens wrote:

Ahoy ahoy,

I'm really interested in ElasticSearch but I'm having some trouble.
Specifically:

  • I'm trying to write some tests that drive the API (mostly for my own
    discovery and understanding), but can't find the javadocs online, in the
    download, or when I build the distribution.
  • I get runtime exceptions when I use the Groovy API per the guide [1].
  • I can build a local distribution (running "gradlew"), but running any
    gradle target fails [2].

My setup is: Mac OS X 10.5.8, ElasticSearch 0.16.2, gradle 0.8, groovy 1.7,
Java 1.6.0_24_blah-blah.

I'll keep snooping around and tinkering, and thanks in advance for any help
you can provide!

Best,
Rich

[1] - This code:

-snip-

    GNodeBuilder nodeBuilder = nodeBuilder()

    nodeBuilder.settings {

        node {

            client = true

        }

        cluster {

            name = "test"

        }

    }
    node = nodeBuilder.node()

-snip-

results in this exception at runtime:

groovy.lang.MissingMethodException: No signature of method: static
org.elasticsearch.common.xcontent.XContentFactory.contentBinaryBuilder() is
applicable for argument types:
(org.elasticsearch.common.xcontent.XContentType$1) values: [JSON]
at
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1360)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1346)
at
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:35)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:63)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes$0.callCurrent(Unknown
Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:59)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes.call(Unknown
Source)
...

[2] - elasticsearch-elasticsearch-abfc7f0$ gradle -S

FAILURE: Build failed with an exception.

  • Where:
    Build file 'elasticsearch-elasticsearch-abfc7f0/build.gradle' line: 5

  • What went wrong:
    A problem occurred evaluating root project 'elasticsearch-root'.
    Cause: Could not find method apply() for arguments [{plugin=base}] on root
    project 'elasticsearch-root'.


(Shay Banon) #4

You can get the javadocs from the maven repo, but it seems like you are using an older jar of the lang-groovy integration.

On Sunday, June 5, 2011 at 1:57 AM, Rich Cariens wrote:

Yes, I'm sure I'm using the 0.16.2 distro (the 0.16.2 jar is on my classpath). That said, the groovy snippet below is directly from the Groovy API page (http://www.elasticsearch.org/guide/reference/groovy-api/client.html) on the ES website.

Perhaps I just need access to the latest javadocs/groovydocs. Are they published somewhere?

On Sat, Jun 4, 2011 at 6:01 PM, Shay Banon <shay.banon@elasticsearch.com (mailto:shay.banon@elasticsearch.com)> wrote:

Are you sure you are using the correct version? I think you got things mixed up, teh groovy code you are running is not 0.16.2. Why not use directly the 0.16.2 distribution?

On Sunday, June 5, 2011 at 12:45 AM, Rich Cariens wrote:

Ahoy ahoy,

I'm really interested in ElasticSearch but I'm having some trouble. Specifically:
I'm trying to write some tests that drive the API (mostly for my own discovery and understanding), but can't find the javadocs online, in the download, or when I build the distribution.
I get runtime exceptions when I use the Groovy API per the guide [1].
I can build a local distribution (running "gradlew"), but running any gradle target fails [2].

My setup is: Mac OS X 10.5.8, ElasticSearch 0.16.2, gradle 0.8, groovy 1.7, Java 1.6.0_24_blah-blah.

I'll keep snooping around and tinkering, and thanks in advance for any help you can provide!

Best,
Rich

[1] - This code:

-snip-
GNodeBuilder nodeBuilder = nodeBuilder()
nodeBuilder.settings {
node {
client = true
}
cluster {
name = "test"
}
}
node = nodeBuilder.node()
-snip-

results in this exception at runtime:

groovy.lang.MissingMethodException: No signature of method: static org.elasticsearch.common.xcontent.XContentFactory.contentBinaryBuilder() is applicable for argument types: (org.elasticsearch.common.xcontent.XContentType$1) values: [JSON]
at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1360)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1346)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:35)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:63)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes$0.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:59)
at org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes.call(Unknown Source)
...

[2] - elasticsearch-elasticsearch-abfc7f0$ gradle -S

FAILURE: Build failed with an exception.

  • Where:
    Build file 'elasticsearch-elasticsearch-abfc7f0/build.gradle' line: 5

  • What went wrong:
    A problem occurred evaluating root project 'elasticsearch-root'.
    Cause: Could not find method apply() for arguments [{plugin=base}] on root project 'elasticsearch-root'.


(rcariens) #5

Thanks so much Shay. I'll double-check my groovy jar and grab those
javadocs. Keep up the good work!

On Sat, Jun 4, 2011 at 7:10 PM, Shay Banon shay.banon@elasticsearch.comwrote:

You can get the javadocs from the maven repo, but it seems like you are
using an older jar of the lang-groovy integration.

On Sunday, June 5, 2011 at 1:57 AM, Rich Cariens wrote:

Yes, I'm sure I'm using the 0.16.2 distro (the 0.16.2 jar is on my
classpath). That said, the groovy snippet below is directly from the Groovy
API pagehttp://www.elasticsearch.org/guide/reference/groovy-api/client.htmlon the ES website.

Perhaps I just need access to the latest javadocs/groovydocs. Are they
published somewhere?

On Sat, Jun 4, 2011 at 6:01 PM, Shay Banon shay.banon@elasticsearch.comwrote:

Are you sure you are using the correct version? I think you got things
mixed up, teh groovy code you are running is not 0.16.2. Why not use
directly the 0.16.2 distribution?

On Sunday, June 5, 2011 at 12:45 AM, Rich Cariens wrote:

Ahoy ahoy,

I'm really interested in ElasticSearch but I'm having some trouble.
Specifically:

  • I'm trying to write some tests that drive the API (mostly for my own
    discovery and understanding), but can't find the javadocs online, in the
    download, or when I build the distribution.
  • I get runtime exceptions when I use the Groovy API per the guide [1].
  • I can build a local distribution (running "gradlew"), but running any
    gradle target fails [2].

My setup is: Mac OS X 10.5.8, ElasticSearch 0.16.2, gradle 0.8, groovy 1.7,
Java 1.6.0_24_blah-blah.

I'll keep snooping around and tinkering, and thanks in advance for any help
you can provide!

Best,
Rich

[1] - This code:

-snip-

    GNodeBuilder nodeBuilder = nodeBuilder()

    nodeBuilder.settings {

        node {

            client = true

        }

        cluster {

            name = "test"

        }

    }
    node = nodeBuilder.node()

-snip-

results in this exception at runtime:

groovy.lang.MissingMethodException: No signature of method: static
org.elasticsearch.common.xcontent.XContentFactory.contentBinaryBuilder() is
applicable for argument types:
(org.elasticsearch.common.xcontent.XContentType$1) values: [JSON]
at
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1360)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1346)
at
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:35)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:63)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes$0.callCurrent(Unknown
Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder.buildAsBytes(GXContentBuilder.groovy:59)
at
org.elasticsearch.groovy.common.xcontent.GXContentBuilder$buildAsBytes.call(Unknown
Source)
...

[2] - elasticsearch-elasticsearch-abfc7f0$ gradle -S

FAILURE: Build failed with an exception.

  • Where:
    Build file 'elasticsearch-elasticsearch-abfc7f0/build.gradle' line: 5

  • What went wrong:
    A problem occurred evaluating root project 'elasticsearch-root'.
    Cause: Could not find method apply() for arguments [{plugin=base}] on root
    project 'elasticsearch-root'.


(system) #6