Hi Michael, Sorry for my late reply. Your reply is very helpful for me! Thank you so much!
Regards, Amber Michael Hunger於 2016年2月11日星期四 UTC+8上午9時54分58秒寫道: > > Hi Amber, > > currently the lookup of an individual node is supported by an fast index > if you check for equality and ranges. > > Regular expressions and contains are not index backed, but STARTS WITH is. > > In Neo4j 3.0 CONTAINS will also be index backed. > > Please also note that neither CONTAINS nor STARTS WITH currently are case > insensitive. > You can store your property in lower or upper case and then do the same > with your search term. > > > If you need the functionality above there are manual indexes in Neo4j, > which I described here: > > http://jexp.de/blog/2014/03/full-text-indexing-fts-in-neo4j-2-0/ > > HTH Michael > > > On Tue, Feb 9, 2016 at 7:26 AM, Amber <fwo...@gmail.com <javascript:>> > wrote: > >> Thanks for your reply, Michael. >> >> "Please note that this won't be a efficient lookup right now." Could you >> please expand it more? I'm just starting using Neo4j and cypher. Actually, >> the retrieval performance (i.e. response time) is important for the project >> I'm working on. Thank you so much! >> >> >> On Tuesday, 9 February 2016 14:10:20 UTC+8, Michael Hunger wrote: >>> >>> you can use >>> >>> lower(m.diseaseName) CONTAINS lower(disease) >>> >>> instead of the regexp then you don't have to escape the regular >>> expression special characters. >>> >>> Please note that this won't be a efficient lookup right now. >>> >>> >>> On Tue, Feb 9, 2016 at 6:44 AM, Amber <fwo...@gmail.com> wrote: >>> >>>> Hi all, >>>> >>>> I'm working on a project which aims to build a system to retrieve >>>> biomedical information (e.g. biomedical entities such as drugs, diseases >>>> and genes, and the relationships between them). When I tried to >>>> retrieve the database to find a specific disease using a cypher statement: >>>> >>>> For cypher string "MATCH (m:Disease) WHERE m.disease_name =~ >>>> '(?i)"+disease+"' RETURN m"; >>>> >>>> if the disease with a name of "2'-benzoyloxycinnamaldehyde" or >>>> "4-[1-ALLYL-7-(TRIFLUOROMETHYL)-1H-INDAZOL-3-YL]BENZENE-1,3-DIOL" , >>>> exceptions will occur with messages as follows: >>>> >>>> Invalid input '"': expected 0..9, '.', 'e', 'E', an identifier >>>> character, whitespace, node labels, '[', "=~", IN, STARTS, ENDS, CONTAINS, >>>> IS, '^', '*', '/', '%', '+', '-', '=', "<>", "!=", '<', '>', "<=", ">=", >>>> AND, XOR, OR, LOAD CSV, START, MATCH, UNWIND, MERGE, CREATE, SET, DELETE, >>>> REMOVE, FOREACH, WITH, RETURN, UNION, ';' or end of input (line 1, column >>>> 53 (offset: 52)) >>>> "MATCH (n1:Drug)-[x]-(n2:Disease) RETURN n1 LIMIT 25"" >>>> >>>> How could I fix this problem? Thank you so much! >>>> >>>> -- >>>> 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+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> > -- 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/d/optout.