Hi Luanne,
If I'm using *SKIP* *12 LIMIT 25 *then I think it should return results
starting from 13th to 25.
If I'm right, then in this case why it is returning 25 rows?
If I'm wrong, then how to get the results starting from 12 and ending with
25 (ie 13 rows)?

-Sukaant Chaudhary


On Tue, Dec 31, 2013 at 3:56 PM, Luanne Coutinho
<luanne.couti...@gmail.com>wrote:

> Yes, irrespective of your skip, Limit 25 will return 25 rows if there are
> 25 rows to return. The only difference skip makes is whether to return 25
> rows starting from the first record (skip 0) or 25 rows starting from the
> 13th record (skip 12).
>
>
> On Tue, Dec 31, 2013 at 3:53 PM, Sukaant Chaudhary <
> sukaant.chaudh...@gmail.com> wrote:
>
>> Hi Luanne,
>> If I'm trying this query then it is returning 25 rows - *It is accepted*.
>>
>> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct m MATCH
>> (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate + l.eventStartTime
>> >= "2013-12-3115:47:57" OR l.eventEndDate +
>> l.eventEndTime>="2013-12-3115:47:57" RETURN l ORDER BY l.eventStartDate +
>> l.eventStartTime ASC *SKIP 0 LIMIT 25*;
>>
>>
>> But when I'm trying this query then also it is returning 25 rows - *Is
>> it accepted* *?*
>>
>> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct m MATCH
>> (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate + l.eventStartTime
>> >= "2013-12-3115:47:57" OR l.eventEndDate +
>> l.eventEndTime>="2013-12-3115:47:57" RETURN l ORDER BY l.eventStartDate +
>> l.eventStartTime ASC *SKIP* *12 LIMIT 25*;
>>
>> -Sukaant Chaudhary
>>
>>
>> On Tue, Dec 31, 2013 at 3:42 PM, Luanne Coutinho <
>> luanne.couti...@gmail.com> wrote:
>>
>>> Yes 25 rows will be returned because that's the limit you set (assuming
>>> of course that you have more than 25 rows).
>>>
>>> If you want  the "total no of rows which are in the limit" then limit 25
>>> will give you 25 rows.
>>> Please see Skip: http://docs.neo4j.org/chunked/milestone/query-skip.htmland 
>>> Limit:
>>> http://docs.neo4j.org/chunked/milestone/query-limit.html
>>>
>>> -Luanne
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 31, 2013 at 3:31 PM, Sukaant Chaudhary <
>>> sukaant.chaudh...@gmail.com> wrote:
>>>
>>>> Hi Luanne,
>>>> This query is working fine for sorting the dates but now there is 1
>>>> issue with *SKIP* if I pass *SKIP 0 LIMIT 25* then it works fine and
>>>> returns 25 rows, but when I pass *SKIP 10 LIMIT 25* then also it
>>>> returns 25 rows.
>>>>
>>>> Here I noticed that it is adding and returning from all the nodes but I
>>>> want total no of rows which are in the limit.
>>>>
>>>> -Sukaant Chaudhary
>>>>
>>>>
>>>> On Mon, Dec 30, 2013 at 6:55 PM, Luanne Coutinho <
>>>> luanne.couti...@gmail.com> wrote:
>>>>
>>>>> Sukaant, you have the > again after the "with distinct m".
>>>>> To find out the cause of errors, please try debugging by breaking up
>>>>> the query to isolate the faulty part.
>>>>>
>>>>> e.g.
>>>>> Try
>>>>> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m)
>>>>> Return m
>>>>> (no error)
>>>>>
>>>>> Then try
>>>>>
>>>>> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m)
>>>>> WITH distinct m >
>>>>> return m
>>>>>
>>>>> -->Error, so check the clause you added last i.e. the With clause.
>>>>>
>>>>> This query
>>>>> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct m
>>>>> MATCH (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate + 
>>>>> l.eventStartTime >= "2013-12-3017:37:00" OR l.eventEndDate + 
>>>>> l.eventEndTime>="2013-12-3017:37:00" RETURN l ORDER BY l.eventStartDate + 
>>>>> l.eventStartTime ASC SKIP 0 LIMIT 25;
>>>>>
>>>>> worked fine for me on your database.
>>>>>
>>>>> -Luanne
>>>>>
>>>>>
>>>>> On Mon, Dec 30, 2013 at 6:17 PM, Sukaant Chaudhary <
>>>>> sukaant.chaudh...@gmail.com> wrote:
>>>>>
>>>>>> Hi Luanne,
>>>>>> I tried the following query:
>>>>>>
>>>>>>    -
>>>>>>    neo4j-sh (?)$ START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH 
>>>>>> distinct m > MATCH (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE 
>>>>>> l.eventStartDate + l.eventStartTime >= "2013-12-3017:37:00" OR 
>>>>>> l.eventEndDate + l.eventEndTime>="2013-12-3017:37:00" RETURN l ORDER BY 
>>>>>> l.eventStartDate + l.eventStartTime ASC SKIP 0 LIMIT 25;
>>>>>>    -
>>>>>>    ==> SyntaxException: Invalid input ':': expected whitespace, an 
>>>>>> identifier, an expression or ']' (line 1, column 80)
>>>>>>    -
>>>>>>    ==> "START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct 
>>>>>> m > MATCH (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate + 
>>>>>> l.eventStartTime >= "2013-12-3017:37:00" OR l.eventEndDate + 
>>>>>> l.eventEndTime>="2013-12-3017:37:00" RETURN l ORDER BY l.eventStartDate 
>>>>>> + l.eventStartTime ASC SKIP 0 LIMIT 25"
>>>>>>    - ==>
>>>>>>
>>>>>> Please check this
>>>>>>
>>>>>> -Sukaant Chaudhary
>>>>>>
>>>>>>
>>>>>> On Mon, Dec 30, 2013 at 6:07 PM, Luanne Coutinho <
>>>>>> luanne.couti...@gmail.com> wrote:
>>>>>>
>>>>>>> You are missing the quotes around the
>>>>>>> l.eventEndTime>=2013-12-3017:37:00 string.
>>>>>>>
>>>>>>> Please keep the mailing list copied, other folks can also contribute.
>>>>>>>
>>>>>>> Regards
>>>>>>> Luanne
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Dec 30, 2013 at 5:53 PM, Sukaant Chaudhary <
>>>>>>> sukaant.chaudh...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Luanne,
>>>>>>>> I tried the following query:
>>>>>>>>
>>>>>>>> START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH distinct m >
>>>>>>>> MATCH (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate +
>>>>>>>> l.eventStartTime >= '2013-12-3017:37:00' OR l.eventEndDate +
>>>>>>>> l.eventEndTime>=2013-12-3017:37:00 RETURN l ORDER BY l.eventStartDate +
>>>>>>>> l.eventStartTime ASC SKIP 0 LIMIT 25;
>>>>>>>>
>>>>>>>> Now I'm getting the following exception:
>>>>>>>>
>>>>>>>> SyntaxException: Invalid input ':': expected whitespace, an 
>>>>>>>> identifier, an expression or ']' (line 1, column 80)
>>>>>>>>
>>>>>>>>    -
>>>>>>>>    ==> "START n=node(2) MATCH (n)-[:FOLLOWED_BY*..5]->(m) WITH 
>>>>>>>> distinct m > MATCH (m)-[:PUBLISHED_UNDER*..5]->(l) WHERE 
>>>>>>>> l.eventStartDate + l.eventStartTime >= '2013-12-3017:37:00' OR 
>>>>>>>> l.eventEndDate + l.eventEndTime>=2013-12-3017:37:00 RETURN l ORDER BY 
>>>>>>>> l.eventStartDate + l.eventStartTime ASC SKIP 0 LIMIT 25"
>>>>>>>>    - ==
>>>>>>>>    ^
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -Sukaant Chaudhary
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Dec 30, 2013 at 5:38 PM, Luanne Coutinho <
>>>>>>>> luanne.couti...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Sukaant, just make a string with your format:
>>>>>>>>> "2013-12-3017:37:00"
>>>>>>>>>
>>>>>>>>> And use that in place of timestamp().
>>>>>>>>> That will work on the console.
>>>>>>>>> If passing a in a value through a programming  language/api, then
>>>>>>>>> please parameterize your query by following
>>>>>>>>> http://docs.neo4j.org/chunked/milestone/cypher-parameters.html
>>>>>>>>>
>>>>>>>>> -Luanne
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Dec 30, 2013 at 5:34 PM, Sukaant Chaudhary <
>>>>>>>>> sukaant.chaudh...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Luanne,
>>>>>>>>>> Please try the following query in the given URL
>>>>>>>>>> and help me how to pass in a string value of the current datetime
>>>>>>>>>> to compare:
>>>>>>>>>>
>>>>>>>>>> START n=node(2) MATCH (n)-[s:FOLLOWED_BY*..5]->(m) WITH distinct
>>>>>>>>>> m > MATCH (m)-[r:PUBLISHED_UNDER*..5]->(l) WHERE l.eventStartDate +
>>>>>>>>>> l.eventStartTime >= timestamp() OR l.eventEndDate +
>>>>>>>>>> l.eventEndTime>=timestamp() RETURN l ORDER BY l.eventStartDate +
>>>>>>>>>> l.eventStartTime ASC SKIP 0 LIMIT 25;
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> http://ec2-54-213-105-153.us-west-2.compute.amazonaws.com:7474/webadmin/#/console/
>>>>>>>>>>
>>>>>>>>>> -Sukaant Chaudhary
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>  --
>>> 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 neo4j+unsubscr...@googlegroups.com.
>>> 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 neo4j+unsubscr...@googlegroups.com.
>> 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 neo4j+unsubscr...@googlegroups.com.
> 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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to