Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-28 Thread Andreas Ronge
Thanks a lot ! On Tue, Sep 28, 2010 at 11:22 PM, Mattias Persson matt...@neotechnology.com wrote: I think there's a working version of it now... look at the tests for more information:

Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-24 Thread Mattias Persson
2010/9/24 Andreas Ronge andreas.ro...@jayway.se On Thu, Sep 23, 2010 at 7:50 PM, Mattias Persson matt...@neotechnology.com wrote: 2010/9/23 Andreas Ronge andreas.ro...@jayway.se That's really good news ! Does it also work if it was not indexes as Strings ? ( so that we can sort

[Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-23 Thread Andreas Ronge
Hi In the example https://svn.neo4j.org/laboratory/components/lucene-index/trunk/src/test/java/org/neo4j/index/impl/lucene/TestLuceneIndex.java I only see how to sort by Sort.RELEVANCE and Sort.INDEXORDER. How do I sort ascending/ on different fields ? Another related question, how does neo4j

Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-23 Thread Paddy
Hi Andreas, Yes it looks like you don't need to wrap it in a padded string. I tried using myIndex.add(ndOne, time,1f); it will stills work. thanks Paddy On Thu, Sep 23, 2010 at 12:37 AM, Andreas Ronge andreas.ro...@jayway.sewrote: Hi Paddy Thanks for the response. But it would be nice to

Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-23 Thread Mattias Persson
It doesn't try to use NumericField... maybe that can be done somehow so that range queries can more easily be asked, I'll add that as a ticket 2010/9/23 Paddy paddyf...@gmail.com Hi Andreas, Yes it looks like you don't need to wrap it in a padded string. I tried using myIndex.add(ndOne,

Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-23 Thread Mattias Persson
Btw I don't think lucene can do that kind of multiple-field sorting for you, or can it? 2010/9/23 Mattias Persson matt...@neotechnology.com It doesn't try to use NumericField... maybe that can be done somehow so that range queries can more easily be asked, I'll add that as a ticket 2010/9/23

Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-23 Thread Mattias Persson
2010/9/23 Mattias Persson matt...@neotechnology.com Btw I don't think lucene can do that kind of multiple-field sorting for you, or can it? Scratch that... you can do: myNodeIndex.query( new QueryContext( name:*...@gmail.com ).sort( new Sort( new SortField( name, SortField.STRING ) ) );

Re: [Neo4j] How do I sort Lucene results by field value, and numerical range queries ?

2010-09-23 Thread Mattias Persson
2010/9/23 Andreas Ronge andreas.ro...@jayway.se That's really good news ! Does it also work if it was not indexes as Strings ? ( so that we can sort integers or floats without any padding) I guess that requires that neo4j-lucene adds NumericField instances to the lucene document. Exactly,