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 <konstanze.lor...@fh-zwickau.de>

> 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
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to