Incremental update document with id containing special charcters using api to capture page hit count

I am trying to update a document to capture page visit or hitcount which
has id containing http:// say http://shashankp254.wordpress.com/about/feed/

So with the syntax

POST http://172.29.83.173:9200/testcount/typecount/"http://shashankp254.wordpress.com/about/feed/"/_update
-d {
"script" : "ctx._source.hitcount= 1"
}

i am getting error

No handler found for uri
[/testcount/typecount/%22http://shashankp254.wordpress.com/about/feed/%22/_update]
and method [POST]

But if i have a proper id say integer
like http://172.29.83.173:9200/testcount/typecount/2/_update

I am getting proper response.

Please help me if there is an alternate way to partially update the
document.

Also, during incremental update i shouldn't lose the hitcount

regards
naveen

--
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/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You must escape the id according to the rules in URI escaping (percent
encoding), see RFC 3986 http://tools.ietf.org/html/rfc3986

Jörg

On Wed, Dec 31, 2014 at 2:37 PM, N Bijalwan ahcirpma@gmail.com wrote:

I am trying to update a document to capture page visit or hitcount which
has id containing http:// say
http://shashankp254.wordpress.com/about/feed/

So with the syntax

POST http://172.29.83.173:9200/testcount/typecount/"
http://shashankp254.wordpress.com/about/feed/"/_update -d {
"script" : "ctx._source.hitcount= 1"
}

i am getting error

No handler found for uri [/testcount/typecount/%22
http://shashankp254.wordpress.com/about/feed/"/_update] and method
[POST]

But if i have a proper id say integer like
http://172.29.83.173:9200/testcount/typecount/2/_update

I am getting proper response.

Please help me if there is an alternate way to partially update the
document.

Also, during incremental update i shouldn't lose the hitcount

regards
naveen

--
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/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.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/CAKdsXoGN6UCCiWz33d6Yj-b6BnreZHsQ1_7nDfAzkV5vGKzgNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

On Wed, Dec 31, 2014 at 8:37 AM, N Bijalwan ahcirpma@gmail.com wrote:

I am trying to update a document to capture page visit or hitcount which
has id containing http:// say
http://shashankp254.wordpress.com/about/feed/

That is probably a bad idea. Partial updates don't exist at the level of
on disk storage and indexing. Elasticsearch's scripted updates are great
for preventing race conditions across and stuff but the entire old document
has to be tombstoned and a whole new one has to be indexed. So its
probably a bad idea to implement a counter that way.

So with the syntax

POST http://172.29.83.173:9200/testcount/typecount/"
http://shashankp254.wordpress.com/about/feed/"/_update -d {
"script" : "ctx._source.hitcount= 1"
}

i am getting error

No handler found for uri [/testcount/typecount/%22
http://shashankp254.wordpress.com/about/feed/"/_update] and method
[POST]

But if i have a proper id say integer like
http://172.29.83.173:9200/testcount/typecount/2/_update

I am getting proper response.

Please help me if there is an alternate way to partially update the
document.

Also, during incremental update i shouldn't lose the hitcount

regards
naveen

--
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/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.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/CAPmjWd359yH8qtLUhr0ETtCQcSDfF6oQj4gzeL%2BSJeYhGR7YTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

thanks Jorg, Nikolas

escaping URL is good suggestion and also the idea of implementing a counter
in this fashion is not good. But for we are crawling pages from manifoldcf
and want to maintain counter from other source directly in ES.

Is there a any other way of recording some attributes which are specific to
user who hit the searched id into elasticsearch or that should be done
outside elastic search.

If this not the best way to do then we are planning to create a new index
type where we will store counter as;

{ "_id":"http://shashankp254.wordpress.com/about/feed/",
"type":"typecount",
"hitcount:1
}

Although, maintaining hitcount in elastic search may not do anything with
indexing but keeping it in elastic search might require only one query to
make join to fetch that.

thanks for the useful comments. It would be great if someone can share some
relevant links along same lines.

regards
naveen

On Wednesday, 31 December 2014 20:39:48 UTC+5:30, Nikolas Everett wrote:

On Wed, Dec 31, 2014 at 8:37 AM, N Bijalwan <ahci...@gmail.com
<javascript:>> wrote:

I am trying to update a document to capture page visit or hitcount which
has id containing http:// say
http://shashankp254.wordpress.com/about/feed/

That is probably a bad idea. Partial updates don't exist at the level of
on disk storage and indexing. Elasticsearch's scripted updates are great
for preventing race conditions across and stuff but the entire old document
has to be tombstoned and a whole new one has to be indexed. So its
probably a bad idea to implement a counter that way.

So with the syntax

POST http://172.29.83.173:9200/testcount/typecount/"
http://shashankp254.wordpress.com/about/feed/"/_update -d {
"script" : "ctx._source.hitcount= 1"
}

i am getting error

No handler found for uri [/testcount/typecount/%22
http://shashankp254.wordpress.com/about/feed/"/_update] and method
[POST]

But if i have a proper id say integer like
http://172.29.83.173:9200/testcount/typecount/2/_update

I am getting proper response.

Please help me if there is an alternate way to partially update the
document.

Also, during incremental update i shouldn't lose the hitcount

regards
naveen

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.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/a3ca00a7-9354-425f-a0fe-3fe90242b56e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Keeping the hit counter in elasticsearch is fine so long as you don't
update it every time the page is accessed. If you push updates daily or
hourly or something you should be much better off. That just means you
can't use Elasticsearch as the accumulator. I mean, it'll be fine either
way if you have hundreds or a couple thousand hits a day. But you get the
idea - at some point that kind of high update rate will cause trouble.

Nik

On Wed, Dec 31, 2014 at 12:32 PM, N Bijalwan ahcirpma@gmail.com wrote:

thanks Jorg, Nikolas

escaping URL is good suggestion and also the idea of implementing a
counter in this fashion is not good. But for we are crawling pages from
manifoldcf and want to maintain counter from other source directly in ES.

Is there a any other way of recording some attributes which are specific
to user who hit the searched id into elasticsearch or that should be done
outside elastic search.

If this not the best way to do then we are planning to create a new index
type where we will store counter as;

{ "_id":"http://shashankp254.wordpress.com/about/feed/",
"type":"typecount",
"hitcount:1
}

Although, maintaining hitcount in elastic search may not do anything with
indexing but keeping it in elastic search might require only one query to
make join to fetch that.

thanks for the useful comments. It would be great if someone can share
some relevant links along same lines.

regards
naveen

On Wednesday, 31 December 2014 20:39:48 UTC+5:30, Nikolas Everett wrote:

On Wed, Dec 31, 2014 at 8:37 AM, N Bijalwan ahci...@gmail.com wrote:

I am trying to update a document to capture page visit or hitcount which
has id containing http:// say http://shashankp254.
wordpress.com/about/feed/

That is probably a bad idea. Partial updates don't exist at the level of
on disk storage and indexing. Elasticsearch's scripted updates are great
for preventing race conditions across and stuff but the entire old document
has to be tombstoned and a whole new one has to be indexed. So its
probably a bad idea to implement a counter that way.

So with the syntax

POST http://172.29.83.173:9200/testcount/typecount/"http
://shashankp254.wordpress.com/about/feed/"/_update -d {
"script" : "ctx._source.hitcount= 1"
}

i am getting error

No handler found for uri [/testcount/typecount/%22http:
//shashankp254.wordpress.com/about/feed/"/_update] and method [POST]

But if i have a proper id say integer like http://172.29.83.173:
9200/testcount/typecount/2/_update

I am getting proper response.

Please help me if there is an alternate way to partially update the
document.

Also, during incremental update i shouldn't lose the hitcount

regards
naveen

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.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/a3ca00a7-9354-425f-a0fe-3fe90242b56e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a3ca00a7-9354-425f-a0fe-3fe90242b56e%40googlegroups.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/CAPmjWd3mHiFo03kaXLVnG8Tb-m2yqm8KbC8mxn%2B4q-CCUGTevQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

thanks Nikolas. We will keepyour sugesstions in mind.

On Thursday, 1 January 2015 00:41:52 UTC+5:30, Nikolas Everett wrote:

Keeping the hit counter in elasticsearch is fine so long as you don't
update it every time the page is accessed. If you push updates daily or
hourly or something you should be much better off. That just means you
can't use Elasticsearch as the accumulator. I mean, it'll be fine either
way if you have hundreds or a couple thousand hits a day. But you get the
idea - at some point that kind of high update rate will cause trouble.

Nik

On Wed, Dec 31, 2014 at 12:32 PM, N Bijalwan <ahci...@gmail.com
<javascript:>> wrote:

thanks Jorg, Nikolas

escaping URL is good suggestion and also the idea of implementing a
counter in this fashion is not good. But for we are crawling pages from
manifoldcf and want to maintain counter from other source directly in ES.

Is there a any other way of recording some attributes which are specific
to user who hit the searched id into elasticsearch or that should be done
outside elastic search.

If this not the best way to do then we are planning to create a new index
type where we will store counter as;

{ "_id":"http://shashankp254.wordpress.com/about/feed/",
"type":"typecount",
"hitcount:1
}

Although, maintaining hitcount in elastic search may not do anything with
indexing but keeping it in elastic search might require only one query to
make join to fetch that.

thanks for the useful comments. It would be great if someone can share
some relevant links along same lines.

regards
naveen

On Wednesday, 31 December 2014 20:39:48 UTC+5:30, Nikolas Everett wrote:

On Wed, Dec 31, 2014 at 8:37 AM, N Bijalwan ahci...@gmail.com wrote:

I am trying to update a document to capture page visit or hitcount
which has id containing http:// say http://shashankp254.
wordpress.com/about/feed/

That is probably a bad idea. Partial updates don't exist at the level
of on disk storage and indexing. Elasticsearch's scripted updates are
great for preventing race conditions across and stuff but the entire old
document has to be tombstoned and a whole new one has to be indexed. So
its probably a bad idea to implement a counter that way.

So with the syntax

POST http://172.29.83.173:9200/testcount/typecount/"http
://shashankp254.wordpress.com/about/feed/"/_update -d {
"script" : "ctx._source.hitcount= 1"
}

i am getting error

No handler found for uri [/testcount/typecount/%22http:
//shashankp254.wordpress.com/about/feed/"/_update] and method [POST]

But if i have a proper id say integer like http://172.29.83.173:
9200/testcount/typecount/2/_update

I am getting proper response.

Please help me if there is an alternate way to partially update the
document.

Also, during incremental update i shouldn't lose the hitcount

regards
naveen

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/9050d686-18de-4ec0-9baf-da730f2f7e29%40googlegroups.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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a3ca00a7-9354-425f-a0fe-3fe90242b56e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a3ca00a7-9354-425f-a0fe-3fe90242b56e%40googlegroups.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/95dcff45-e3fd-4ccc-bca7-f668762edbaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.