Have you looked at the lucene documentation? Neo4j doesn't touch any of that, it lets Lucene do the sorting. Do your values have lots of words in them (snippets of text)? You could probably copy-paste the exception message and google it!
2010/10/29 Konstanze.Lorenz <[email protected]> > Sorry for the brackets. In my test, they weren't there! > Thank you for fixing the problem. It works much better. > Now I have an additional question: sorting a result. > Is it possible to sort fulltext results when the values do have space > characters? Currently I get an exception, that the field has too much tokens > to be sorted. > I'm expecting that sort will look in the queryresult for the whole field > value (not only its tokens) and sort it then. > > -----Ursprüngliche Nachricht----- > Von: [email protected] [mailto:[email protected]] Im > Auftrag von Mattias Persson > Gesendet: Dienstag, 26. Oktober 2010 13:34 > An: Neo4j user discussions > Betreff: Re: [Neo4j] LuceneIndexProvider EXACT_CONFIG vs. FULLTEXT_CONFIG > > I just found the problem... fulltext defaults to being case-insensitive (by > converting added values as well as string queries to lower case). There's a > quirk in the Lucene QueryParser where you must specifically set whether or > not range/wildcard queries should have their terms converted into lower > case > or not, and by that ignoring what the analyzer has to say about it, which I > feel is a poor design decision in Lucene. Because now if you specify your > own custom analyzer class in the configuration you must also set the > "to_lower_case" parameter to how the analyzer is implemented, otherwise you > cannot expect to get the correct results back. Anyways, range/wildcard > terms > are lower cased more correctly now. > > Your queries will work with the latest SNAPSHOT, however your second query > doesn't look like a proper lucene query. Maybe you meant "Arn*" w/o the > brackets? > > Main difference between "exact" and "fulltext" is that a fulltext index > tokenizes your values into words and indexes each word individually (and > also by default converting them into lower case). > > 2010/10/26 Konstanze.Lorenz <[email protected]> > > > Hello, > > I'm giving the new LuceneIndexProvider a trial und try to become > acquainted > > with EXACT_CONFIG and FULLTEXT_CONFIG. Currently, I do not understand > some > > differences between their quering-results.. > > For example: > > String nameArnold = "Arnold Aronson"; > > String key = "name"; > > > > Node nodeArnold = neo.createNode(); > > nodeArnold.setProperty(key, nameArnold); > > index.add(nodeArnold, key, nameArnold); > > -------------------------- > > index.query(key, "[A TO Z]"; //(1) > > index.query(key, "[Arn*]"; //(2) > > > > These querys work only with EXACT. FULLTEXT returns no matches. But a > > RangeQuery (1) for String would be quiet interesting with FULLTEXT. It > > should return the same matches as EXACT at least. Furthermore, the Query > > Parser Syntax of Lucene should be enabled in FULLTEXT (2). > > So here is the question: Am I not seeing the trick to use them similarly > or > > are these configurations that different as they seem to be? > > _______________________________________________ > > Neo4j mailing list > > [email protected] > > https://lists.neo4j.org/mailman/listinfo/user > > > > > > -- > Mattias Persson, [[email protected]] > Hacker, Neo Technology > www.neotechnology.com > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [[email protected]] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

