What version of SDN are you using at the moment?
Cheers
Michael
it seems that in lucene you have to quote search terms that contain spaces and other characters.
So please try "name:\"*my test*\"".
Not sure about the stars if they should be inside or outside of the quote :)
HTH
Michael
start a=node:OFFER_NAME_SEARCH('name:"*Demo World*"') return a => does
not work
this week has unfortunately been quite demanding, so we haven't caught up with everything, we will next week.
He runs into the same issue as you.
I started to look into it and it seems one needs quoting but OTOH I'm not sure about the stars (wildcard search) this is more a Lucene query syntax issue than a neo4j one.
So exact lookups work so far, but not wildcard matches. Haven't made any other progress. Sorry
Michael
A few comments:
- If you are fulltext indexing on the term you're searching for, the individual terms will be parsed separately (e.g. there will be no such thing as "embedded spaces")
- At present, wildcard searches with embedded spaces are not supported by the Lucene query parser, AFAIK (thus your issue with the wildcard query)
- Terms that contain whitespace need to be delimited. You can try:
Item lookupDrPepperByFullDescription = itemRepository.findByDescription("\"Dr Pepper 6 pack\"");
- You should *REALLY* avoid leading wildcard queries if you can. They are not very performant in Lucene (trailing wildcards are more performant, but you may run into issues with those as well, if you have a lot of terms in your index)
Hope this helps,
Rick
What we could perhaps leverage are keywords that you can place in the query.
findByTitleLike(String title) -> search for the string with stars around it "title:*text*"
findByTitleExact(String title) -> search for the string, add quotes automatically
findByTitleRegexp(String title) -> regexp search on fields, don't know if lucene supports regexps
findByTitleAllKeywords(String title) -> split a string into keywords and AND them
findByTitleAnyKeywords(String title) -> split a string into keywords and OR them
Michael
@Indexed(type = FULLTEXT) String description
Am 04.02.2012 um 01:13 schrieb Bytor99999:
Michael
Von meinem iPhone gesendet
So either it could analyse the params and auto-split and convert the individual parts into to an AND search.
Not sure about too much automatism?
Perhaps they findByDescriptionAnyKeyword and findByDescriptionAllKeyword would be better?
Michael
Florian,
This sounds like a great blog post on the evolution of your architecture? Might be very helpful to others as you say.
Glad it works out.
Send from a device with crappy keyboard and autocorrection.
/peter