Re: [Arches] EDTF dates generating errors

2019-04-03 Thread Neil Silberman
Thanks so much, Alexei!  

On Wednesday, April 3, 2019 at 2:12:33 PM UTC-4, Alexei Peters wrote:
>
> Hi Neil,
> This might be an issue with how Elasticsearch dynamically maps incoming 
> data to data types.  The very first time that a new value of a certain type 
> is saved, Elasticsearch will assign a datatype to it.  In the case of an 
> EDTF datatype, if the first time a user saved a value to that field and 
> that value might be construed as an integer, then ES will map it that way 
> and all future values would have to conform to that mapping.  Most of the 
> time this doesn't seem to be an issue, but EDTF values should be mapped to 
> type "text" but could easily get mapped to an "integer" or "date" type.
> See: 
> https://www.elastic.co/guide/en/elasticsearch/reference/6.6/dynamic-field-mapping.html#dynamic-field-mapping
>
> A temporary work around (if you can do it), would be to start from a clean 
> install, and then make sure that the first value that you save can't be 
> cast to anything other than a text value (eg: 1945?), something like "1945" 
> wouldn't work, as it would be mapped to a "long" field.
>
> Another alternative would be to create a new temporary index with the 
> proper mappings and then using ES, reindex your data into that new index.  
> Then delete your old index and recreate with the same "new" mapping (but 
> with the original name) and then reindex again back into that index.
>
> see this doc for the reindex api: 
> https://www.elastic.co/guide/en/elasticsearch/reference/6.6/docs-reindex.html
>
> Hopefully that helps.
>
> Cheers,
> Alexei
>
> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
>
> 
>
> On Wed, Apr 3, 2019 at 8:42 AM Neil Silberman  > wrote:
>
>> Hi all-- We've come across a strange error during a training session with 
>> the use of EDTF dates. We believe everything is set up correctly: the graph 
>> model is using edtf (instead of date) as the node type and the card is 
>> using the edtf-widget. However, when someone puts in, e.g. 1945?  They get 
>> a 400 error (can’t parse ‘?’). We checked the google group and github and 
>> nothing seemed to suggest that other people were having this problem – is 
>> it an error with the build of arches we are using (4.4.1) on the server? 
>> Did we miss something? Thanks in advance for any feedback on this.
>>
>> Here's the error message:
>>
>>
>> Unable to save. A RequestError has occurred. Arguments: (400, 
>> u'mapper_parsing_exception', {u'status': 400, u'error': {u'caused_by': 
>> {u'reason': u"Can't get text on a START_OBJECT at 1:2105", u'type': 
>> u'illegal_state_exception'}, u'root_cause': [{u'reason': u'failed to parse 
>> [tiles.data.b955b3a0-e749-11e6-84a6-026d961c88e6]', u'type': 
>> u'mapper_parsing_exception'}], u'type': u'mapper_parsing_exception', 
>> u'reason': u'failed to parse 
>> [tiles.data.b955b3a0-e749-11e6-84a6-026d961c88e6]'}})
>>
>> -- 
>> -- To post, send email to arches...@googlegroups.com . To 
>> unsubscribe, send email to arches...@googlegroups.com . For 
>> more information, visit 
>> https://groups.google.com/d/forum/archesproject?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Arches Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to arches...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to archesproject+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Arches] EDTF dates generating errors

2019-04-03 Thread Alexei Peters
Hi Neil,
This might be an issue with how Elasticsearch dynamically maps incoming
data to data types.  The very first time that a new value of a certain type
is saved, Elasticsearch will assign a datatype to it.  In the case of an
EDTF datatype, if the first time a user saved a value to that field and
that value might be construed as an integer, then ES will map it that way
and all future values would have to conform to that mapping.  Most of the
time this doesn't seem to be an issue, but EDTF values should be mapped to
type "text" but could easily get mapped to an "integer" or "date" type.
See:
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/dynamic-field-mapping.html#dynamic-field-mapping

A temporary work around (if you can do it), would be to start from a clean
install, and then make sure that the first value that you save can't be
cast to anything other than a text value (eg: 1945?), something like "1945"
wouldn't work, as it would be mapped to a "long" field.

Another alternative would be to create a new temporary index with the
proper mappings and then using ES, reindex your data into that new index.
Then delete your old index and recreate with the same "new" mapping (but
with the original name) and then reindex again back into that index.

see this doc for the reindex api:
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/docs-reindex.html

Hopefully that helps.

Cheers,
Alexei

Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


On Wed, Apr 3, 2019 at 8:42 AM Neil Silberman 
wrote:

> Hi all-- We've come across a strange error during a training session with
> the use of EDTF dates. We believe everything is set up correctly: the graph
> model is using edtf (instead of date) as the node type and the card is
> using the edtf-widget. However, when someone puts in, e.g. 1945?  They get
> a 400 error (can’t parse ‘?’). We checked the google group and github and
> nothing seemed to suggest that other people were having this problem – is
> it an error with the build of arches we are using (4.4.1) on the server?
> Did we miss something? Thanks in advance for any feedback on this.
>
> Here's the error message:
>
>
> Unable to save. A RequestError has occurred. Arguments: (400,
> u'mapper_parsing_exception', {u'status': 400, u'error': {u'caused_by':
> {u'reason': u"Can't get text on a START_OBJECT at 1:2105", u'type':
> u'illegal_state_exception'}, u'root_cause': [{u'reason': u'failed to parse
> [tiles.data.b955b3a0-e749-11e6-84a6-026d961c88e6]', u'type':
> u'mapper_parsing_exception'}], u'type': u'mapper_parsing_exception',
> u'reason': u'failed to parse
> [tiles.data.b955b3a0-e749-11e6-84a6-026d961c88e6]'}})
>
> --
> -- To post, send email to archesproject@googlegroups.com. To unsubscribe,
> send email to archesproject+unsubscr...@googlegroups.com. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to archesproject+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to archesproject+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Arches] EDTF dates generating errors

2019-04-03 Thread Neil Silberman
Hi all-- We've come across a strange error during a training session with 
the use of EDTF dates. We believe everything is set up correctly: the graph 
model is using edtf (instead of date) as the node type and the card is 
using the edtf-widget. However, when someone puts in, e.g. 1945?  They get 
a 400 error (can’t parse ‘?’). We checked the google group and github and 
nothing seemed to suggest that other people were having this problem – is 
it an error with the build of arches we are using (4.4.1) on the server? 
Did we miss something? Thanks in advance for any feedback on this.

Here's the error message:


Unable to save. A RequestError has occurred. Arguments: (400, 
u'mapper_parsing_exception', {u'status': 400, u'error': {u'caused_by': 
{u'reason': u"Can't get text on a START_OBJECT at 1:2105", u'type': 
u'illegal_state_exception'}, u'root_cause': [{u'reason': u'failed to parse 
[tiles.data.b955b3a0-e749-11e6-84a6-026d961c88e6]', u'type': 
u'mapper_parsing_exception'}], u'type': u'mapper_parsing_exception', 
u'reason': u'failed to parse 
[tiles.data.b955b3a0-e749-11e6-84a6-026d961c88e6]'}})

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to archesproject+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.