Hi,
1.
> use http://localhost:2480/query/mydbname/sql/select
> gremlin("g.v(<http://localhost:2480/query/mydbname/gremlin/g.v(>
"#9:0").out.map")
> From keyword is not mandatory.
When I tried this, following exception was returned:
java.lang.NumberFormatException: For input string: ""
[ONetworkProtocolHttpDb]
Then, I got another message instead of the above when using OrientDB Studio:
java.lang.IllegalArgumentException: Cannot determine the graph element
type because the document class is null. Probably this is a projection, use
the EXPAND() function [ONetworkProtocolHttpDb]
and I use expand() instead of gremlin() only to return no record.
Note that in former case I used my demo app with OLD JavaScript
API<https://github.com/orientechnologies/orientdb/wiki/Javascript-API>,
and latter one I just used NEW OrientDB Studio.
I think I should use new orientdb-js
API<https://github.com/orientechnologies/orientdb-js>,
but assume APIs are not related to this problem...
2.
Because OrientDB returns exceptions when I send queries including gremlin
script but without FROM keyword, I add it for each query.
But now the number of resuts of the queries changes dependent on the target.
For example with a query select gremlin("g.v('9:9').out.id") from <target>,
when the target is V, the number of results is the number of elements in V,
and when the target is specific vertex(s) (whether it is used for the query
or not), like from [#9:9, #9:10, #9:1], the number of the results becomes
the number of selected vertex(s).
In addition, all results have the same value.
These things in 1 and 2 are also confirmed with 1.7rc2-SNAPSHOT.
Regards,
Shota
On Friday, February 7, 2014 1:15:15 AM UTC+9, Shota Nagahori wrote:
>
> Hi Luca,
>
> The good news is not good news for me, because my web app sends JSONP
> requests to OrientDB.
> I modified the JS API to enable JSONP, so POST is not available.
>
> Shota
>
> On Thursday, January 30, 2014 10:23:53 PM UTC+9, Lvc@ wrote:
>>
>> Hi Shota,
>> I've 2 news, one good, one bad.
>>
>> The bad one is that the WiKi page (
>> https://github.com/orientechnologies/orientdb/wiki/OrientDB-REST#wiki-query)
>> wasn't updated, thank you for the report.
>>
>> The good one is that you can do the same in HTTP POST using /command in
>> place of /query:
>>
>> http://localhost:2480/command/GratefulDeadConcerts/gremlin/-/20
>>
>> Passing as payload:
>>
>> g.v("#9:1").out.map
>>
>> Lvc@
>>
>>
>> On 30 January 2014 14:00, Shota Nagahori <[email protected]> wrote:
>>
>>> Hi,
>>> I got it. Thank you for your replies.
>>> By the way, I tried
>>> http://localhost:2480/query/mydbname/gremlin<http://localhost:2480/query/mydbname/gremlin/g.v(>...
>>>
>>> because I read this wiki
>>> page<https://github.com/orientechnologies/orientdb/wiki/OrientDB-REST#wiki-get---query>,
>>>
>>> which says
>>>
>>> OrientDB distribution comes with "sql" and GraphDB distribution has
>>> both "sql" and "gremlin."
>>>
>>> I really appreciate the effort of developers for improving and enhancing
>>> the product,
>>> but I'd like you to pay more attention to the documentation.
>>>
>>> Best regards,
>>> Shota.
>>>
>>>
>>> On Thursday, January 30, 2014 4:19:07 PM UTC+9, Andrey Lomakin wrote:
>>>
>>>> Sorry, I missed one point do not use http://localhost:2480/
>>>> query/mydbname/gremlin/g.v("#9:0").out.map use http://localhost:2480/
>>>> query/mydbname/sql/select
>>>> gremlin("g.v(<http://localhost:2480/query/mydbname/gremlin/g.v(>
>>>> "#9:0").out.map")
>>>> From keyword is not mandatory.
>>>> There is no path .
>>>> http://localhost:2480/query/mydbname/gremlin<http://localhost:2480/query/mydbname/gremlin/g.v(>...
>>>>
>>>> in OrientDB.
>>>>
>>>>
>>>> On Thu, Jan 30, 2014 at 1:44 AM, Shota Nagahori
>>>> <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I also confirmed the error with GratefulDeadConcerts. So I don't think
>>>>> it is DB-specific problem.
>>>>>
>>>>> Shota
>>>>>
>>>>>
>>>>> On Thursday, January 30, 2014 12:35:17 AM UTC+9, Andrey Lomakin wrote:
>>>>>
>>>>>> HI,
>>>>>> Could you send me your database so I will be able to reproduce issue ?
>>>>>>
>>>>>>
>>>>>> On Wed, Jan 29, 2014 at 12:08 PM, Shota Nagahori <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Andrey,
>>>>>>>
>>>>>>> I'm sorry for my late reply.
>>>>>>> I tried v1.7-SNAPSHOT, and confirmed that 2. worked but 1. still
>>>>>>> threw the same error.
>>>>>>>
>>>>>>> Shota.
>>>>>>>
>>>>>>>
>>>>>>> On Monday, January 20, 2014 11:59:38 PM UTC+9, Andrey Lomakin wrote:
>>>>>>>
>>>>>>>> HI Shota,
>>>>>>>>
>>>>>>>> Sorry, we do not support old versions could you try on 1.6.4 and
>>>>>>>> 1.7-SNAPSHOT branch ?
>>>>>>>> If issue persists we will fix it for you.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sun, Jan 19, 2014 at 2:21 AM, Shota Nagahori <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I'm using OLD js API in my web app to communicate to OrientDB
>>>>>>>>> (v1.5.1).
>>>>>>>>> Query requests with the extended SQL work properly, but those
>>>>>>>>> with Gremlin, and the SQL using "select gremlin(...)," do not.
>>>>>>>>> I tried both of two ways like following:
>>>>>>>>>
>>>>>>>>> 1. http://localhost:2480/query/mydbname/gremlin/g.v("#9:0").out
>>>>>>>>> .map
>>>>>>>>> 2. http://localhost:2480/query/mydbname/sql/select
>>>>>>>>> gremlin("current.out.map") from #9:0
>>>>>>>>>
>>>>>>>>> When sending the above requests, I got an internal server error:
>>>>>>>>>
>>>>>>>>> java.lang.NumberFormatException: For input string: ""
>>>>>>>>> [ONetworkProtocolHttpDb]
>>>>>>>>>
>>>>>>>>> The REST API of OrientDB does not recognize gremlin query
>>>>>>>>> requests, even though wiki says it can do?
>>>>>>>>> Or is there something wrong in my request code?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Shota
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "OrientDB" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>>
>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best regards,
>>>>>>>> Andrey Lomakin.
>>>>>>>>
>>>>>>>> Orient Technologies
>>>>>>>> the Company behind OrientDB
>>>>>>>>
>>>>>>>> --
>>>>>>>
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "OrientDB" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards,
>>>>>> Andrey Lomakin.
>>>>>>
>>>>>> Orient Technologies
>>>>>> the Company behind OrientDB
>>>>>>
>>>>>> --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OrientDB" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Andrey Lomakin.
>>>>
>>>> Orient Technologies
>>>> the Company behind OrientDB
>>>>
>>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.