Plugin development - Get Action problem

Hi,

I'm trying to make elasticsearch-view-plugin (
https://github.com/tlrx/elasticsearch-view-plugin) to work with the 0.90.*
version of elasticsearch (
https://github.com/tlrx/elasticsearch-view-plugin/pull/1) and after few
changes to make it compile it started to work on localhost.

Unfortunately, after deploying in a cluster with four nodes the requests
are not working when the load balance deliver the request to the nodes
without the shards the the document is stored.

The exception and the documents I used to test are listed in this gist:

It seems that for any reason the type or the id of the document is null
when the method org.elasticsearch.index.mapper.Uid.createUidAsByte is
executed.

Is there anyone who knows the internals of elasticsearch that could help me
with this problem?

Thank you!

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGrnu47vNqkx-OdWT2BwfVoPrCsmvM1crKmXDJ-PM_waA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Are you trying to read indices written with older versions of Lucene? What
changes did you need to make to TransportViewAction? I have never used the
plugin, but perhaps it is a question of a field being stored or not.

Looking briefly at the code, perhaps there was some breaking change
in ShardGetService.

On Thu, Mar 6, 2014 at 5:48 PM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

Hi,

I'm trying to make elasticsearch-view-plugin (
GitHub - tlrx/elasticsearch-view-plugin: The ElasticSearch View Plugin provides a simple way to render ElasticSearch documents in HTML, XML or text) to work with the
0.90.* version of elasticsearch (
Now view plugin is compatible with 0.90.11 version of elasticsearch. by luizgpsantos · Pull Request #1 · tlrx/elasticsearch-view-plugin · GitHub) and after few
changes to make it compile it started to work on localhost.

Unfortunately, after deploying in a cluster with four nodes the requests
are not working when the load balance deliver the request to the nodes
without the shards the the document is stored.

The exception and the documents I used to test are listed in this gist:
Elasticsearch-view-plugin error · GitHub

It seems that for any reason the type or the id of the document is null
when the method org.elasticsearch.index.mapper.Uid.createUidAsByte is
executed.

Is there anyone who knows the internals of elasticsearch that could help
me with this problem?

Thank you!

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGrnu47vNqkx-OdWT2BwfVoPrCsmvM1crKmXDJ-PM_waA%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGrnu47vNqkx-OdWT2BwfVoPrCsmvM1crKmXDJ-PM_waA%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDXQTg8YeV4h7aHfVcL0OrHoDwM%2B410%3DTOxa-ZiKg8tHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Ivan,

My first attempt was with indices created with older versions of Lucene but
after your email I create a new index to test but the problem still occurs.

In TransportViewAction I just had to change the name of the methods, for
example,

instead of:
viewContext.index(getResult.index()).type(getResult.type()).id(getResult.id()).version(getResult.version())

I used:
viewContext.index(getResult.getIndex()).type(getResult.getType()).id(getResult.getId()).version(getResult.getVersion())

It might be some break change in ShardGetService but I still couldn't find
it :frowning:

On Fri, Mar 7, 2014 at 2:13 PM, Ivan Brusic ivan@brusic.com wrote:

Are you trying to read indices written with older versions of Lucene? What
changes did you need to make to TransportViewAction? I have never used the
plugin, but perhaps it is a question of a field being stored or not.

Looking briefly at the code, perhaps there was some breaking change
in ShardGetService.

On Thu, Mar 6, 2014 at 5:48 PM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

Hi,

I'm trying to make elasticsearch-view-plugin (
GitHub - tlrx/elasticsearch-view-plugin: The ElasticSearch View Plugin provides a simple way to render ElasticSearch documents in HTML, XML or text) to work with the
0.90.* version of elasticsearch (
Now view plugin is compatible with 0.90.11 version of elasticsearch. by luizgpsantos · Pull Request #1 · tlrx/elasticsearch-view-plugin · GitHub) and after few
changes to make it compile it started to work on localhost.

Unfortunately, after deploying in a cluster with four nodes the requests
are not working when the load balance deliver the request to the nodes
without the shards the the document is stored.

The exception and the documents I used to test are listed in this gist:
Elasticsearch-view-plugin error · GitHub

It seems that for any reason the type or the id of the document is null
when the method org.elasticsearch.index.mapper.Uid.createUidAsByte is
executed.

Is there anyone who knows the internals of elasticsearch that could help
me with this problem?

Thank you!

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGrnu47vNqkx-OdWT2BwfVoPrCsmvM1crKmXDJ-PM_waA%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGrnu47vNqkx-OdWT2BwfVoPrCsmvM1crKmXDJ-PM_waA%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDXQTg8YeV4h7aHfVcL0OrHoDwM%2B410%3DTOxa-ZiKg8tHA%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDXQTg8YeV4h7aHfVcL0OrHoDwM%2B410%3DTOxa-ZiKg8tHA%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGqaZspoJmGXOG0MVA4YwMW8Xzen8h_OH%3DuCcC4rWtKxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Lucene 4 has changed in many ways. Renaming does not help.

Look at TransportGetAction to implement a correct GetResult:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/get/TransportGetAction.java#L101

Jörg

On Fri, Mar 7, 2014 at 10:15 PM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

It might be some break change in ShardGetService but I still couldn't find
it :frowning:

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Jörg,

After your e-mail I tried to complete rewrite my "TransportViewAction"
based in the TransportGetAction. But it still don't work LOL

There might have something trick that I couldn't guess.

On Fri, Mar 7, 2014 at 10:47 PM, joergprante@gmail.com <
joergprante@gmail.com> wrote:

Lucene 4 has changed in many ways. Renaming does not help.

Look at TransportGetAction to implement a correct GetResult:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/get/TransportGetAction.java#L101

Jörg

On Fri, Mar 7, 2014 at 10:15 PM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

It might be some break change in ShardGetService but I still couldn't
find it :frowning:

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGKqC%3DU6-xq_T7ntzVVOEfYzOiBX5wit0MwPYWcbbKqjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

When I saw the last commit of the plugin was March 3rd, I assumed it was
this year and you were trying to backport the plugin to 0.90. Now I
understand that you are trying to upgrade from 0.20, which indeed involve
an upgrade in Lucene.

Perhaps if you shared the TransportViewAction code, we can help. The change
might be minor.

Cheers,

Ivan

On Sat, Mar 8, 2014 at 7:34 AM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

Hi Jörg,

After your e-mail I tried to complete rewrite my "TransportViewAction"
based in the TransportGetAction. But it still don't work LOL

There might have something trick that I couldn't guess.

On Fri, Mar 7, 2014 at 10:47 PM, joergprante@gmail.com <
joergprante@gmail.com> wrote:

Lucene 4 has changed in many ways. Renaming does not help.

Look at TransportGetAction to implement a correct GetResult:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/get/TransportGetAction.java#L101

Jörg

On Fri, Mar 7, 2014 at 10:15 PM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

It might be some break change in ShardGetService but I still couldn't
find it :frowning:

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGKqC%3DU6-xq_T7ntzVVOEfYzOiBX5wit0MwPYWcbbKqjw%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGKqC%3DU6-xq_T7ntzVVOEfYzOiBX5wit0MwPYWcbbKqjw%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCDfusua8im2CinkTQ7%3D7jqvc5_3_nk9HBJeRetmiWK7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I'm trying to migrate from 0.20 to 0.90.

The changes I made to get it compile are in my forked repo:

The specific commit is:

On Sat, Mar 8, 2014 at 2:56 PM, Ivan Brusic ivan@brusic.com wrote:

When I saw the last commit of the plugin was March 3rd, I assumed it was
this year and you were trying to backport the plugin to 0.90. Now I
understand that you are trying to upgrade from 0.20, which indeed involve
an upgrade in Lucene.

Perhaps if you shared the TransportViewAction code, we can help. The
change might be minor.

Cheers,

Ivan

On Sat, Mar 8, 2014 at 7:34 AM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

Hi Jörg,

After your e-mail I tried to complete rewrite my "TransportViewAction"
based in the TransportGetAction. But it still don't work LOL

There might have something trick that I couldn't guess.

On Fri, Mar 7, 2014 at 10:47 PM, joergprante@gmail.com <
joergprante@gmail.com> wrote:

Lucene 4 has changed in many ways. Renaming does not help.

Look at TransportGetAction to implement a correct GetResult:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/get/TransportGetAction.java#L101

Jörg

On Fri, Mar 7, 2014 at 10:15 PM, Luiz Guilherme Pais dos Santos <
luizgpsantos@gmail.com> wrote:

It might be some break change in ShardGetService but I still couldn't
find it :frowning:

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAKdsXoGfw%2BbkDsU01XiSwcrW5%3Duy5MC8CDKf8jx3Aq%3DhA-TGyQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGKqC%3DU6-xq_T7ntzVVOEfYzOiBX5wit0MwPYWcbbKqjw%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGKqC%3DU6-xq_T7ntzVVOEfYzOiBX5wit0MwPYWcbbKqjw%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCDfusua8im2CinkTQ7%3D7jqvc5_3_nk9HBJeRetmiWK7A%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCDfusua8im2CinkTQ7%3D7jqvc5_3_nk9HBJeRetmiWK7A%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
Luiz Guilherme P. Santos

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZEi8YY0LnMW5S6veke24CLe29bvECQjFXoAdumDRJ_XCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.