Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cypher query with exclusion of IDs
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kiteflo  
View profile  
 More options May 20 2012, 7:08 am
From: kiteflo <kite...@gmail.com>
Date: Sun, 20 May 2012 04:08:14 -0700 (PDT)
Local: Sun, May 20 2012 7:08 am
Subject: Cypher query with exclusion of IDs
Hi,

we have a couple of node IDs we wanna exclude from our search result,
we could do sth like this:

start similar=node:SKW_NAMEKEY_SEARCH({searchString}) WHERE node.id !=
"123" AND node.id != "234" AND node.id != "345"...

But I'm pretty sure there is a smarter way of excluding IDs from a
search result - any hint? Any example query around for this one?

Thanks a lot in advance!
Cheers, Florian...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options May 20 2012, 7:11 am
From: Peter Neubauer <neubauer.pe...@gmail.com>
Date: Sun, 20 May 2012 13:11:10 +0200
Local: Sun, May 20 2012 7:11 am
Subject: Re: [Neo4j] Cypher query with exclusion of IDs

I think you could use

Id(x) not in [1, 5,9 ]

Send from mobile.
On May 20, 2012 1:08 PM, "kiteflo" <kite...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options May 20 2012, 7:53 am
From: kiteflo <kite...@gmail.com>
Date: Sun, 20 May 2012 04:53:41 -0700 (PDT)
Local: Sun, May 20 2012 7:53 am
Subject: Re: Cypher query with exclusion of IDs
hmmm...

tried several things, but theses all result in the exception below
(the important part is the WHERE clause, if we leave out the AND
condition it works like charm so the query is basically 100% ok).
Maybe I should have mentioned we are passing in the IDs we want to
filter as a query param (List<Long> offerIds), just to make sure you
get the situation right I put down our Repo-Service right here:

@Query("start similarSpat=node:GEO_INDEX({withinDistanceParam}),
offer=node({offerId}) " +
                        "MATCH (offer) -[r:"+RelTypes.CATEGORY_LINK+"]-> (category) " +
                        "<-[r2:"+RelTypes.CATEGORY_LINK+"]- (similar) " +
                        "<-[r3:GEOFIES]-loc<-[r4:MANUAL_SPATIAL_CONNECT]-similarSpat " +
                        "WHERE (similar.__type__ = 'Offer' " +
                        "AND ID(similar) NOT IN [{offerIds}]) " +
                        "return distinct similar, sum(r2.emphasis) order by
sum(r2.emphasis) desc")
        public Page<OfferRecommendation>
findRelatedOffersForOfferWithinRadiusExcluding(
                        @Param("offerId") long offerId,
                        @Param("withinDistanceParam") String withinDistanceParam,
                        @Param("offerIds") List<Long> offerIds,
                        Pageable page);

Any clue what should be changed?

Thanx, Florian...

Error executing statement start
similarSpat=node:GEO_INDEX({withinDistanceParam}),
offer=node({offerId}) MATCH (offer) -[r:CATEGORY_LINK]-> (category) <-
[r2:CATEGORY_LINK]- (similar) <-[r3:GEOFIES]-loc<-
[r4:MANUAL_SPATIAL_CONNECT]-similarSpat WHERE (similar.__type__ =
'Offer' AND ID(similar) NOT IN [{offerIds}]) return distinct similar,
sum(r2.emphasis) order by sum(r2.emphasis) desc skip 0 limit 6; nested
exception is
org.springframework.dao.InvalidDataAccessResourceUsageException: Error
executing statement start
similarSpat=node:GEO_INDEX({withinDistanceParam}),
offer=node({offerId}) MATCH (offer) -[r:CATEGORY_LINK]-> (category) <-
[r2:CATEGORY_LINK]- (similar) <-[r3:GEOFIES]-loc<-
[r4:MANUAL_SPATIAL_CONNECT]-similarSpat WHERE (similar.__type__ =
'Offer' AND ID(similar) NOT IN [{offerIds}]) return distinct similar,
sum(r2.emphasis) order by sum(r2.emphasis) desc skip 0 limit 6; nested
exception is `-' expected but `N' found
Unfortunately, you have run into a syntax error that we don't have a
nice message for.
By sending the query that produced this error to cyp...@neo4j.org,
you'll save the
puppies and get better error messages in our next release.

Thank you, the Neo4j Team.] with root cause
`-' expected but `N' found
Unfortunately, you have run into a syntax error that we don't have a
nice message for.
By sending the query that produced this error to cyp...@neo4j.org,
you'll save the
puppies and get better error messages in our next release.

Thank you, the Neo4j Team.
        at
org.neo4j.cypher.internal.parser.v1_7.CypherParserImpl.parse(CypherParserIm pl.scala:
68)
        at org.neo4j.cypher.CypherParser.parse(CypherParser.scala:44)
        at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare
$1.apply(ExecutionEngine.scala:61)
        at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare
$1.apply(ExecutionEngine.scala:61)
        at org.neo4j.cypher.internal.LRUCache.getOrElseUpdate(LRUCache.scala:
31)
        at org.neo4j.cypher.ExecutionEngine.prepare(ExecutionEngine.scala:61)
        at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
        at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:58)
        at
org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:
86)
        at
org.springframework.data.neo4j.support.query.CypherQueryEngine.parseAndExec uteQuery(CypherQueryEngine.java:
65)
        at
org.springframework.data.neo4j.support.query.CypherQueryEngine.query(Cypher QueryEngine.java:
53)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispat chQuery(GraphRepositoryQuery.java:
87)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execut e(GraphRepositoryQuery.java:
70)
        at
org.springframework.data.repository.core.support.RepositoryFactorySupport
$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:
313)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(T ransactionInterceptor.java:
110)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor. invoke(PersistenceExceptionTranslationInterceptor.java:
155)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
204)
        at $Proxy83.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop Utils.java:
307)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
198)
        at $Proxy84.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at
com.helios.service.plain.OfferService.findOffersSimilarExceptVisited(OfferS ervice.java:
665)
        at
com.helios.web.controller.OfferController.detail(OfferController.java:
364)
        at com.helios.web.controller.OfferController$$FastClassByCGLIB$
$a1c74a23.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
        at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
        at com.helios.web.controller.OfferController$$EnhancerByCGLIB$
$fbb2a9df.detail(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(Invoca bleHandlerMethod.java:
212)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequ est(InvocableHandlerMethod.java:
126)
        at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandl erMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:
96)
        at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:
617)
        at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.handleInternal(RequestMappingHandlerAdapter.java:
578)
        at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.han dle(AbstractHandlerMethodAdapter.java:
80)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServ let.java:
900)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl et.java:
827)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe rvlet.java:
882)
        at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.jav a:
778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
305)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
155)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
243)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
197)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
171)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
243)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
        at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor .invoke(FilterSecurityInterceptor.java:
116)
        at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor .doFilter(FilterSecurityInterceptor.java:
83)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:
113)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.session.SessionManagementFilter.doFilter(S essionManagementFilter.java:
101)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.authentication.AnonymousAuthenticationFilt er.doFilter(AnonymousAuthenticationFilter.java:
113)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.servletapi.SecurityContextHolderAwareReque stFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:
54)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFil ter(RequestCacheAwareFilter.java:
45)
        at
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options May 20 2012, 9:47 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Sun, 20 May 2012 15:47:00 +0200
Subject: Re: [Neo4j] Re: Cypher query with exclusion of IDs
you should use:
>                    "AND ID(similar) NOT IN {offerIds} "

as the parameter is already a list/iterable.

Michael

Am 20.05.2012 um 13:53 schrieb kiteflo:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options May 20 2012, 3:32 pm
From: kiteflo <kite...@gmail.com>
Date: Sun, 20 May 2012 12:32:05 -0700 (PDT)
Local: Sun, May 20 2012 3:32 pm
Subject: Re: Cypher query with exclusion of IDs
hmmm..this one we've tried as well but it results in the same
exception...(see below)

any further hints?

20.05.2012 21:18:50 org.apache.catalina.core.StandardWrapperValve
invoke
SCHWERWIEGEND: Servlet.service() for servlet [dispatcher] in context
with path [/helios] threw exception [Request processing failed; nested
exception is
org.springframework.dao.InvalidDataAccessResourceUsageException: Error
executing statement start
similarSpat=node:GEO_INDEX({withinDistanceParam}),
offer=node({offerId}) MATCH (offer) -[r:CATEGORY_LINK]-> (category) <-
[r2:CATEGORY_LINK]- (similar) <-[r3:GEOFIES]-loc<-
[r4:MANUAL_SPATIAL_CONNECT]-similarSpat WHERE (similar.__type__ =
'Offer' AND ID(similar) NOT IN {offerIds}) return distinct similar,
sum(r2.emphasis) order by sum(r2.emphasis) desc skip 0 limit 6; nested
exception is
org.springframework.dao.InvalidDataAccessResourceUsageException: Error
executing statement start
similarSpat=node:GEO_INDEX({withinDistanceParam}),
offer=node({offerId}) MATCH (offer) -[r:CATEGORY_LINK]-> (category) <-
[r2:CATEGORY_LINK]- (similar) <-[r3:GEOFIES]-loc<-
[r4:MANUAL_SPATIAL_CONNECT]-similarSpat WHERE (similar.__type__ =
'Offer' AND ID(similar) NOT IN {offerIds}) return distinct similar,
sum(r2.emphasis) order by sum(r2.emphasis) desc skip 0 limit 6; nested
exception is `-' expected but `N' found
Unfortunately, you have run into a syntax error that we don't have a
nice message for.
By sending the query that produced this error to cyp...@neo4j.org,
you'll save the
puppies and get better error messages in our next release.

Thank you, the Neo4j Team.] with root cause
`-' expected but `N' found
Unfortunately, you have run into a syntax error that we don't have a
nice message for.
By sending the query that produced this error to cyp...@neo4j.org,
you'll save the
puppies and get better error messages in our next release.

Thank you, the Neo4j Team.
        at
org.neo4j.cypher.internal.parser.v1_7.CypherParserImpl.parse(CypherParserIm pl.scala:
68)
        at org.neo4j.cypher.CypherParser.parse(CypherParser.scala:44)
        at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare
$1.apply(ExecutionEngine.scala:61)
        at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare
$1.apply(ExecutionEngine.scala:61)
        at org.neo4j.cypher.internal.LRUCache.getOrElseUpdate(LRUCache.scala:
31)
        at org.neo4j.cypher.ExecutionEngine.prepare(ExecutionEngine.scala:61)
        at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
        at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:58)
        at
org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:
86)
        at
org.springframework.data.neo4j.support.query.CypherQueryEngine.parseAndExec uteQuery(CypherQueryEngine.java:
65)
        at
org.springframework.data.neo4j.support.query.CypherQueryEngine.query(Cypher QueryEngine.java:
53)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispat chQuery(GraphRepositoryQuery.java:
87)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execut e(GraphRepositoryQuery.java:
70)
        at
org.springframework.data.repository.core.support.RepositoryFactorySupport
$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:
313)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(T ransactionInterceptor.java:
110)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor. invoke(PersistenceExceptionTranslationInterceptor.java:
155)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
204)
        at $Proxy83.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop Utils.java:
307)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
198)
        at $Proxy84.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at
com.helios.service.plain.OfferService.findOffersSimilarExceptVisited(OfferS ervice.java:
665)
        at
com.helios.web.controller.OfferController.detail(OfferController.java:
364)
        at com.helios.web.controller.OfferController$$FastClassByCGLIB$
$a1c74a23.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
        at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
        at com.helios.web.controller.OfferController$$EnhancerByCGLIB$
$354f1354.detail(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(Invoca bleHandlerMethod.java:
212)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequ est(InvocableHandlerMethod.java:
126)
        at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandl erMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:
96)
        at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:
617)
        at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.handleInternal(RequestMappingHandlerAdapter.java:
578)
        at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.han dle(AbstractHandlerMethodAdapter.java:
80)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServ let.java:
900)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl et.java:
827)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe rvlet.java:
882)
        at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.jav a:
778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
305)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
155)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
243)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
197)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
171)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
243)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
        at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor .invoke(FilterSecurityInterceptor.java:
116)
        at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor .doFilter(FilterSecurityInterceptor.java:
83)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:
113)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.session.SessionManagementFilter.doFilter(S essionManagementFilter.java:
101)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.authentication.AnonymousAuthenticationFilt er.doFilter(AnonymousAuthenticationFilter.java:
113)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.servletapi.SecurityContextHolderAwareReque stFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:
54)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFil ter(RequestCacheAwareFilter.java:
45)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.authentication.AbstractAuthenticationProce ssingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:
182)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilte r(LogoutFilter.java:
105)
        at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at
org.springframework.security.web.context.SecurityContextPersistenceFilter.d oFilter(SecurityContextPersistenceFilter.java:
87)
        at org.springframework.security.web.FilterChainProxy
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options May 21 2012, 12:09 am
From: kiteflo <kite...@gmail.com>
Date: Sun, 20 May 2012 21:09:42 -0700 (PDT)
Local: Mon, May 21 2012 12:09 am
Subject: Re: Cypher query with exclusion of IDs
Hi...

we've tried several things this morning, for example querying our own
ID (unique and string based), there seems to be a problem with the NOT
IN clause because as soon as we put in the NOT IN stuff (even if we do
not pass in parameters and insert the condition manuall, for example
"AND similar.id NOT IN ['1','2']") it keeps failing with the same
exception.

Any of the cracks out there got an idea on this issue? Is NOT In
100%ly supported in Neo 1.7/SDN 2.1.0.BUILD-SNAPSHOT?

Thanx in advance, Florian...

On 20 Mai, 21:32, kiteflo <kite...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options May 21 2012, 4:06 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Mon, 21 May 2012 10:06:08 +0200
Local: Mon, May 21 2012 4:06 am
Subject: Re: [Neo4j] Re: Cypher query with exclusion of IDs
Hi there,
I am getting the right results on http://tinyurl.com/bn35krt with

start n=node(*) where NOT (id(n) IN [0, 1, 2]) return n

Does that work? This is on the current SNAPSHOT.

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options May 21 2012, 4:51 am
From: kiteflo <kite...@gmail.com>
Date: Mon, 21 May 2012 01:51:55 -0700 (PDT)
Local: Mon, May 21 2012 4:51 am
Subject: Re: Cypher query with exclusion of IDs
Hi Peter,

this one we've tried tried as well and we are experiencing two
different behaviors (please consider: this only occurs if we pass in
the "IN-value" as a parameter, if we write these into the query in
terms of [1,2,3] it works:

1) WHERE NOT (ID(similar) IN [{offerIds}]) AND (similar.__type__ =
'Offer')
-> query is executed without errors but we never receive results even
there should be some results around

2) WHERE NOT (ID(similar) IN {offerIds}) AND (similar.__type__ =
'Offer')     (without [] brackets)
-> an exception occurs, see below

Do you have any hints when passing in the IN-params as a List of Long
values? Here is the full query including the way we pass in the
params, or do we need to pass in the params as a map with a certain
field property?

Thanx in advance, Florian..

@Query("start similarSpat=node:GEO_INDEX({withinDistanceParam}),
offer=node({offerId}) " +
                        "MATCH offer-[r1:"+RelTypes.CATEGORY_LINK+"]->category " +
                        "<-[r2:"+RelTypes.CATEGORY_LINK+"]-similar " +
                        "<-[r3:GEOFIES]-loc<-[r4:MANUAL_SPATIAL_CONNECT]-similarSpat " +
                        "WHERE NOT (ID(similar) IN [{offerIds}]) AND (similar.__type__ =
'Offer') " +
                        "return distinct similar, sum(r2.emphasis) order by
sum(r2.emphasis) desc")
        public Page<OfferRecommendation>
findRelatedOffersForOfferWithinRadiusExcluding(
                        @Param("offerId") long offerId,
                        @Param("withinDistanceParam") String withinDistanceParam,
                        @Param("offerIds") List<Long> offerIds,
                        Pageable page);

(Exception thrown when using no brackets)
21.05.2012 10:44:21 org.apache.catalina.core.StandardWrapperValve
invoke
SCHWERWIEGEND: Servlet.service() for servlet [dispatcher] in context
with path [/helios] threw exception [Request processing failed; nested
exception is scala.MatchError: [1275] (of class java.util.ArrayList)]
with root cause
scala.MatchError: [1275] (of class java.util.ArrayList)
        at
org.neo4j.cypher.internal.commands.InIterable.isMatch(InIterable.scala:
30)
        at org.neo4j.cypher.internal.commands.Not.isMatch(Predicate.scala:94)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1$$anonfun$apply
$3.apply(SimplePatternMatcherBuilder.scala:86)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1$$anonfun$apply
$3.apply(SimplePatternMatcherBuilder.scala:86)
        at scala.collection.LinearSeqOptimized
$class.forall(LinearSeqOptimized.scala:69)
        at scala.collection.immutable.List.forall(List.scala:45)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1.apply(SimplePatternMatcherBuilder.scala:86)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1.apply(SimplePatternMatcherBuilder.scala:78)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.Iterator$class.foreach(Iterator.scala:652)
        at scala.collection.JavaConversions
$JIteratorWrapper.foreach(JavaConversions.scala:573)
        at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
        at scala.collection.JavaConversions
$JIterableWrapper.foreach(JavaConversions.scala:587)
        at scala.collection.TraversableLike
$class.flatMap(TraversableLike.scala:200)
        at scala.collection.JavaConversions
$JIterableWrapper.flatMap(JavaConversions.scala:587)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder.getMat ches(SimplePatternMatcherBuilder.scala:
78)
        at
org.neo4j.cypher.internal.pipes.matching.MatchingContext.getMatches(Matchin gContext.scala:
52)
        at org.neo4j.cypher.internal.pipes.MatchPipe$$anonfun$createResults
$1.apply(MatchPipe.scala:33)
        at org.neo4j.cypher.internal.pipes.MatchPipe$$anonfun$createResults
$1.apply(MatchPipe.scala:32)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.LinearSeqOptimized
$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike
$class.flatMap(TraversableLike.scala:200)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at
org.neo4j.cypher.internal.pipes.MatchPipe.createResults(MatchPipe.scala:
32)
        at
org.neo4j.cypher.internal.pipes.FilterPipe.createResults(FilterPipe.scala:
30)
        at
org.neo4j.cypher.internal.pipes.EagerAggregationPipe.createResults(EagerAgg regationPipe.scala:
48)
        at
org.neo4j.cypher.internal.pipes.ExtractPipe.createResults(ExtractPipe.scala :
38)
        at
org.neo4j.cypher.internal.pipes.SortPipe.createResults(SortPipe.scala:
33)
        at
org.neo4j.cypher.internal.pipes.SlicePipe.createResults(SlicePipe.scala:
32)
        at
org.neo4j.cypher.internal.pipes.ColumnFilterPipe.createResults(ColumnFilter Pipe.scala:
37)
        at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun
$3$$anonfun$apply$1.apply(ExecutionPlanImpl.scala:62)
        at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun
$3$$anonfun$apply$1.apply(ExecutionPlanImpl.scala:62)
        at
org.neo4j.cypher.PipeExecutionResult.immutableResult(PipeExecutionResult.sc ala:
36)
        at
org.neo4j.cypher.PipeExecutionResult.iterator(PipeExecutionResult.scala:
138)
        at
org.neo4j.cypher.PipeExecutionResult.hasNext(PipeExecutionResult.scala:
140)
        at scala.collection.Iterator$$anon$19.hasNext(Iterator.scala:334)
        at scala.collection.JavaConversions
$IteratorWrapper.hasNext(JavaConversions.scala:562)
        at
org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:
42)
        at
org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java :
322)
        at
org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java :
341)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.create Page(GraphRepositoryQuery.java:
107)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispat chQuery(GraphRepositoryQuery.java:
88)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execut e(GraphRepositoryQuery.java:
70)
        at
org.springframework.data.repository.core.support.RepositoryFactorySupport
$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:
313)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(T ransactionInterceptor.java:
110)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor. invoke(PersistenceExceptionTranslationInterceptor.java:
155)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
204)
        at $Proxy83.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop Utils.java:
307)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
198)
        at $Proxy84.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at
com.helios.service.plain.OfferService.findOffersSimilarExceptVisited(OfferS ervice.java:
665)
        at
com.helios.web.controller.OfferController.detail(OfferController.java:
364)
        at com.helios.web.controller.OfferController$$FastClassByCGLIB$
$a1c74a23.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
        at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
        at com.helios.web.controller.OfferController$$EnhancerByCGLIB$
$fa7a360a.detail(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(Invoca bleHandlerMethod.java:
212)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequ est(InvocableHandlerMethod.java:
126)
        at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandl erMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:
96)
        at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:
617)
        at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.handleInternal(RequestMappingHandlerAdapter.java:
578)
        at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.han dle(AbstractHandlerMethodAdapter.java:
80)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServ let.java:
900)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl et.java:
827)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe rvlet.java:
882)
        at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.jav a:
778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options May 21 2012, 8:34 am
From: kiteflo <kite...@gmail.com>
Date: Mon, 21 May 2012 05:34:33 -0700 (PDT)
Local: Mon, May 21 2012 8:34 am
Subject: Re: Cypher query with exclusion of IDs
...I will close this one and open up a new one, the "initial" issue of
querying has been resolved - the issue we are fighting down here is
another one so I keep this new issue separated as a new thread...

On 21 Mai, 10:51, kiteflo <kite...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options May 21 2012, 9:01 am
From: Peter Neubauer <neubauer.pe...@gmail.com>
Date: Mon, 21 May 2012 15:01:16 +0200
Local: Mon, May 21 2012 9:01 am
Subject: Re: [Neo4j] Re: Cypher query with exclusion of IDs

OK,
Good call Florian.

Send from mobile.
On May 21, 2012 2:34 PM, "kiteflo" <kite...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »