Indexing code looks OK at a glance. What does the search code look like? Should be easy enough to pass a disk based Directory to your write method to get an index you can look at/play with in Luke.
-- Ian. On Thu, Jan 14, 2010 at 6:54 PM, AlexElba <ramal...@yahoo.com> wrote: > > Did you completely re-index? > Yes I did > > Here is method which creates index > > > > public void write(List<Object[]> data, Directory directory, Analyzer > analyzer) { > IndexWriter indexWriter = new IndexWriter(directory, analyzer, > MaxFieldLength.LIMITED); > > try { > for (Object[] obj: data) { > try { > Document document = new Document(); > Field field = new Field("id", > obj[0].... > document.add(field); > Field rank = new Field("rank", > NumberTools > .longToString(Long.valueOf(obj[3])), Store.NO, > Index.ANALYZED_NO_NORMS); > document.add(rank); > indexWriter.addDocument(document); > } catch (CorruptIndexException e) { > > } catch (IOException e) { > > } > } > } finally { > try { > indexWriter.commit(); > } catch (CorruptIndexException e) { > > } catch (IOException e) { > } > } > } > > > Yeap I am using luke but this app is ram base index... > > > > Steven A Rowe wrote: >> >> Hi AlexElba, >> >> Did you completely re-index? >> >> If you did, then there is some other problem - can you share (more of) >> your code? >> >> Do you know about Luke? It's an essential tool for Lucene index >> debugging: >> >> http://www.getopt.org/luke/ >> >> Steve >> >> On 01/13/2010 at 8:34 PM, AlexElba wrote: >>> >>> Hello, >>> >>> I change filter to follow >>> RangeFilter rangeFilter = new RangeFilter( >>> "rank", NumberTools >>> .longToString(rating), NumberTools >>> .longToString(10), true, true); >>> >>> and change index to store rank the same way... But still not seeing :( >>> any results >>> >>> >>> AlexElba wrote: >>> > >>> > Hello, >>> > >>> > I am currently using lucene 2.4 and have document with 3 fields >>> > >>> > id >>> > name >>> > rank >>> > >>> > and have query and filter when I am trying to use rang filter on rank I >>> > am not getting any result back >>> > >>> > RangeFilter rangeFilter = new RangeFilter("rank", "3", "10", true, >>> > true); >>> > >>> > I have documents which are in this interval >>> > >>> > >>> > Any suggestion what am I doing wrong? >>> > >>> > Regards >>> > >>> > >>> > >>> > >>> > >>> >>> -- View this message in context: http://old.nabble.com/RangeFilter- >>> tp27148785p27155102.html Sent from the Lucene - Java Users mailing list >>> archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- To >>> unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For >>> additional commands, e-mail: java-user-h...@lucene.apache.org >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> >> > > -- > View this message in context: > http://old.nabble.com/RangeFilter-tp27148785p27166330.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org