Yeh any unnamed elements (nodes/rels) in a query get given a name like that
- it uses a random string generator to come up with the name.


On 7 February 2014 22:40, Javad Karabi <[email protected]> wrote:

> any idea why the (chinese?) characters are being displayed? i guess its a
> sort of 'anonymous' relationship, so neo4j decides to name it using chinese
> symbols lol
>
>
> On Thu, Feb 6, 2014 at 6:02 PM, Mark Needham <[email protected]>wrote:
>
>> If I explicitly specify me.name then it's ok as well:
>>
>> MATCH (me:Member)
>> RETURN me.id AS id, me.name, COUNT(*) + CASE me.id > me.name WHEN true
>> then 0 ELSE 5 END
>>
>> Returned 0 rows in 91 ms
>> It's something around adding to aggregates - you don't seem to be able to
>> reference any identifiers unless you already have them earlier in your
>> RETURN clause.
>>
>>
>>
>>
>> On 6 February 2014 23:40, Mark Needham <[email protected]> wrote:
>>
>>> Good question, I'm not sure. Here's some attempts to figure it out:
>>>
>>> MATCH (me:Member)
>>> RETURN me.id AS id, COUNT(*) + CASE me.id > me.name WHEN true then 0
>>> ELSE 5 END
>>>
>>> Unknown identifier `  UNNAMED彟븥ۚ覴ण`.
>>> Unknown identifier `  UNNAMED̫묖ᩊ⚞䋕`.
>>> Unknown identifier `me`.
>>>
>>>
>>> Without count:
>>>
>>> MATCH (me:Member)
>>> RETURN me.id AS id, CASE me.id > me.name WHEN true then 0 ELSE 5 END
>>>
>>> Returned 0 rows in 120 ms
>>> Comparing me.id to me.id:
>>>
>>> MATCH (me:Member)
>>> RETURN me.id AS id, COUNT(*) + CASE me.id > me.id WHEN true then 0 ELSE
>>> 5 END
>>>
>>> Returned 0 rows in 122 ms
>>>
>>> COUNT(me) instead of COUNT(*):
>>>
>>> MATCH (me:Member)
>>> RETURN me.id AS id, COUNT(me) + CASE me.id > me.name WHEN true then 0
>>> ELSE 5 END
>>>
>>> Unknown identifier `  UNNAMED⤂вぐ짃Ǹ`.
>>> Unknown identifier `  UNNAMED᳽퓒讈埂↌`.
>>> Unknown identifier `me`.
>>>
>>>
>>> Michael, Andres, Wes, Stefan any ideas?
>>>
>>>
>>>
>>> On 6 February 2014 23:04, Javad Karabi <[email protected]> wrote:
>>>
>>>> hmm, that does seem to work.
>>>> what do you suppose the issue is?
>>>>
>>>>
>>>>
>>>> On Thu, Feb 6, 2014 at 4:51 PM, Mark Needham <[email protected]>wrote:
>>>>
>>>>> Does this version do the job?
>>>>>
>>>>> MATCH (me:Member {id:
>>>>> 123})-[:preferred_store]->(s)<-[:preferred_store]-(other)-[:ordered]->()<-[:product]-(sv:StyleVariant)
>>>>> WITH other.birth_year as other_birth_year, other, sv.id as
>>>>> style_variant, s, me
>>>>> WITH other_birth_year, style_variant,
>>>>>     count(s) +
>>>>>       CASE HAS(me.birth_year) AND HAS(other.birth_year)
>>>>>         WHEN true THEN
>>>>>           10 - ABS(me.birth_year - other.birth_year)
>>>>>         ELSE
>>>>>           0
>>>>>         END AS score
>>>>> WITH SUM(score) as score_for_style_variant, style_variant ORDER BY
>>>>> score_for_style_variant DESC LIMIT 50
>>>>> RETURN collect(style_variant)
>>>>>
>>>>>
>>>>> On 6 February 2014 22:41, Javad Karabi <[email protected]> wrote:
>>>>>
>>>>>> mark, sure. the query is below.
>>>>>> fwiw, the problem is caused when "other.birth_year as
>>>>>> other_birth_year," is included.
>>>>>> when "other.birth_year as other_birth_year," is removed, it executes
>>>>>> fine.
>>>>>>
>>>>>> MATCH (me:Member {id:
>>>>>> 123})-[:preferred_store]->(s)<-[:preferred_store]-(other)-[:ordered]->()<-[:product]-(sv:StyleVariant)
>>>>>> WITH other.birth_year as other_birth_year, sv.id as style_variant,
>>>>>>     count(s) +
>>>>>>       CASE HAS(me.birth_year) AND HAS(other.birth_year)
>>>>>>         WHEN true THEN
>>>>>>           10 - ABS(me.birth_year - other.birth_year)
>>>>>>         ELSE
>>>>>>           0
>>>>>>         END AS score
>>>>>> WITH SUM(score) as score_for_style_variant, style_variant ORDER BY
>>>>>> score_for_style_variant DESC LIMIT 50
>>>>>> RETURN collect(style_variant)
>>>>>>
>>>>>>
>>>>>> On Thursday, February 6, 2014 4:37:41 PM UTC-6, Mark Needham wrote:
>>>>>>
>>>>>>> Can you paste the whole query? I know we had some problems in 2.0.0
>>>>>>> with that, which version are you using?
>>>>>>>
>>>>>>>
>>>>>>> On 6 February 2014 22:03, Javad Karabi <[email protected]> wrote:
>>>>>>>
>>>>>>>> anyone come across anything like this?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thursday, February 6, 2014 4:02:59 PM UTC-6, Javad Karabi wrote:
>>>>>>>>>
>>>>>>>>> http://screencloud.net/v/7ddO
>>>>>>>>>
>>>>>>>>  --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Neo4j" 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 "Neo4j" 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 a topic in the
>>>>> Google Groups "Neo4j" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/neo4j/5DxzViJREKY/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, 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 "Neo4j" 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 a topic in the
>> Google Groups "Neo4j" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/neo4j/5DxzViJREKY/unsubscribe.
>> To unsubscribe from this group and all its topics, 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
> "Neo4j" 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 
"Neo4j" 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.

Reply via email to