Ok, I've got it. Problems in parsing the json.
It works now.
Thanks anyway :]

On Thu, Jun 23, 2011 at 9:19 AM, Milena Araujo <[email protected]>wrote:

> It looks like that I can't construct a QueryContext object with compound
> query.
> It gives me the following exception when I try to run it:
>
> "org.apache.lucene.queryParser.ParseException: Cannot parse
> 'name:milena%20OR%20name:araujo': Encountered \" \":\" \": \"\" at line 1,
> column 24.\nWas expecting one of:\n    <EOF> \n    <AND> ...\n    <OR> ...\n
>    <NOT> ...\n    \"+\" ...\n    \"-\" ...\n    \"(\" ...\n    \"*\" ...\n
>  \"^\" ...\n    <QUOTED> ...\n    <TERM> ...\n    <FUZZY_SLOP> ...\n
>  <PREFIXTERM> ...\n    <WILDTERM> ...\n    \"[\" ...\n    \"{\" ...\n
>  <NUMBER> ...\n    ",
>   "exception" : "java.lang.RuntimeException:
> org.apache.lucene.queryParser.ParseException: Cannot parse
> 'name:milena%20OR%20name:araujo': Encountered \" \":\" \": \"\" at line 1,
> column 24.\nWas expecting one of:\n    <EOF> \n    <AND> ...\n    <OR> ...\n
>    <NOT> ...\n    \"+\" ...\n    \"-\" ...\n    \"(\" ...\n    \"*\" ...\n
>  \"^\" ...\n    <QUOTED> ...\n    <TERM> ...\n    <FUZZY_SLOP> ...\n
>  <PREFIXTERM> ...\n    <WILDTERM> ...\n    \"[\" ...\n    \"{\" ...\n
>  <NUMBER> ...\n    ",
>
> The line that it breaks is the following:
>
>
> IndexHits<Node> hits = index.query( new QueryContext( query ).sortByScore()
> );
>
>
> On Wed, Jun 22, 2011 at 10:22 PM, Mattias Persson <
> [email protected]> wrote:
>
>> That should be possibly, I can't think of any reason why not.
>>
>> 2011/6/22 Milena Araujo <[email protected]>
>>
>> > Hello all !
>> >
>> > So, looking here:
>> >
>> >
>> http://docs.neo4j.org/chunked/snapshot/indexing-lucene-extras.html#indexing-lucene-sort
>> > There's an example of how to sort by score and later on, how to make a
>> > compound query.
>> > Is it possible to do both ?
>> > Something like: hits = movies.query( new QueryContext("title:*Matrix*
>> AND
>> > year:1999" ).sortByScore() );
>> >
>> > Thanks,
>> >
>> > Milena Araujo.
>> > _______________________________________________
>> > 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

Reply via email to