Thanks Mattias, I'll use the 1.4M04 jars and try my code again. If I get the 
NPE, I'll post my code.

On Jun 17, 2011, at 1:57 AM, Mattias Persson wrote:

> I cannot reproduce this. I'm trying it with this code:
> 
>       // I also tried with FULLTEXT_CONFIG
>       Index<Node> index = graphDb.index().forNodes( "qc",
> LuceneIndexImplementation.EXACT_CONFIG );
>       Node node = graphDb.createNode();
>       index.add( node, "key", "value" );
>       index.query( new QueryContext( "key:value AND key:value" ) );
>       index.query( new QueryContext( "key:value key:value"
> ).defaultOperator( Operator.AND ) );
>       restartTx();
>       index.query( new QueryContext( "key:value AND key:value" ) );
>       index.query( new QueryContext( "key:value key:value"
> ).defaultOperator( Operator.AND ) );
> 
> it doesn't throw any NPE.
> 
> 2011/6/17 Mattias Persson <[email protected]>
> 
>> Hi Kalin,
>> 
>> I'll have a look at it right now
>> 
>> 
>> 2011/6/17 Kalin Wilson Development <[email protected]>
>> 
>>> Perhaps this is fixed in the latest milestone release, I haven't had a
>>> chance to test it yet. I upgraded from 1.3M03 to 1.4M03 and found that my
>>> code that queried node indexes using a QueryContext was throwing a NPE. In
>>> my code I constructed a string similar to "eclass:org.spp.data.Something AND
>>> eid:101" and constructed the QueryContext from that. The QueryContext object
>>> was then passed to an index.query() method.
>>> 
>>> Once I found that the NPE was being thrown by index.query(QueryContext), I
>>> put together a simple test that created and indexed a Node then queried the
>>> index using a QueryContext using various constructs, QueryContext("key:value
>>> key:value).defaultOperator(Operator.AND) and QueryContext("key:value AND
>>> key:value"). Passing either version of these objects to index.query() throws
>>> a NPE, however calling index.query("key:value AND key:value") works and
>>> calling index.query(qc.getQueryOrQueryObject()) works (at least when the
>>> full string with operators is used to build the QC).
>>> 
>>> Has there been a change in how or when to use a QueryContext? Perhaps I'm
>>> using it incorrectly now.
>>> 
>>> Thanks,
>>> Kalin
>>> 
>>> _______________________________________________
>>> Neo4j mailing list
>>> [email protected]
>>> https://lists.neo4j.org/mailman/listinfo/user
>>> 
>> 
>> 
>> 
>> --
>> Mattias Persson, [[email protected]]
>> Hacker, Neo Technology
>> www.neotechnology.com
>> 
> 
> 
> 
> -- 
> 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

Reply via email to