RE: Simple question

2009-11-03 Thread Digy
ber 03, 2009 6:29 PM To: lucene-net-user@incubator.apache.org Subject: Re: Simple question This thread is getting big... Franklin, I totally agree this approach can result in a problem, but I don't know yet how to do this search with TermEnum. What is the basic documentation to learn (I mea

RE: Simple question

2009-11-03 Thread Franklin Simmons
.com] Sent: Tuesday, November 03, 2009 11:29 AM To: lucene-net-user@incubator.apache.org Subject: Re: Simple question This thread is getting big... Franklin, I totally agree this approach can result in a problem, but I don't know yet how to do this search with TermEnum. What is the basic docum

Re: Simple question

2009-11-03 Thread André Maldonado
ed by Digy earlier in this discussion to use TermEnum. > > > -Original Message- > From: André Maldonado [mailto:andre.maldon...@gmail.com] > Sent: Tuesday, November 03, 2009 8:50 AM > To: lucene-net-user@incubator.apache.org > Subject: Re: Simple question > > Whe

RE: Simple question

2009-11-03 Thread Franklin Simmons
@incubator.apache.org Subject: Re: Simple question When I do: Hits hits = searcher.Search(new *MatchAllDocsQuery()*, sort); The searcher return all documents. Can I return only the first 5 documents? Like a TOP 5 in SQL Server? Probably using searcher.Search(Query query, Filter filter, int n, Sort sort

Re: Simple question

2009-11-03 Thread André Maldonado
. >> >> Without knowing specifics, I can only offer that you try SortField.STRING. >> >> -Original Message- >> From: André Maldonado [mailto:andre.maldon...@gmail.com] >> Sent: Friday, October 30, 2009 3:47 PM >> To: lucene-net-user@incubator.apache.org &g

Re: Simple question

2009-11-03 Thread André Maldonado
specifics, I can only offer that you try SortField.STRING. > > -Original Message- > From: André Maldonado [mailto:andre.maldon...@gmail.com] > Sent: Friday, October 30, 2009 3:47 PM > To: lucene-net-user@incubator.apache.org > Subject: Re: Simple question > >

RE: Simple question

2009-10-30 Thread Franklin Simmons
: André Maldonado [mailto:andre.maldon...@gmail.com] Sent: Friday, October 30, 2009 3:47 PM To: lucene-net-user@incubator.apache.org Subject: Re: Simple question Hi again Franklin. Sorry, but didn't work. I'm using Lucene.net 2.3 and doing exactly what you said, I'm get

RE: Simple question

2009-10-30 Thread Digy
e to looping through Hits". DIGY. -Original Message- From: André Maldonado [mailto:andre.maldon...@gmail.com] Sent: Friday, October 30, 2009 6:57 PM To: lucene-net-user@incubator.apache.org Subject: Simple question Hi. This can be a simple question, but I can't figure out the solu

Re: Simple question

2009-10-30 Thread André Maldonado
09 2:06 PM > To: lucene-net-user@incubator.apache.org > Subject: RE: Simple question > > Oops, I'm not being very helpful. > > Use the MatchAllDocumentsQuery class: > > Searcher searcher = new IndexSearcher(directory); > > Sort = new Sort(new SortField("

Re: Simple question

2009-10-30 Thread André Maldonado
ink I'll hang it up for the day. The correct query class > name is 'MatchAllDocsQuery'. > > -Original Message- > From: Franklin Simmons [mailto:fsimm...@sccmediaserver.com] > Sent: Friday, October 30, 2009 2:06 PM > To: lucene-net-user@incubator.apache.org >

RE: Simple question

2009-10-30 Thread Franklin Simmons
09 2:01 PM To: lucene-net-user@incubator.apache.org Subject: RE: Simple question Hi André, In this case you simply sort on the field. This may suffice: Searcher searcher = new IndexSearcher(directory); Sort = new Sort(new SortField("another_field", SortField.AUTO, false)); Hits hits = searcher.search

RE: Simple question

2009-10-30 Thread Franklin Simmons
ator.apache.org Subject: RE: Simple question Hi André, In this case you simply sort on the field. This may suffice: Searcher searcher = new IndexSearcher(directory); Sort = new Sort(new SortField("another_field", SortField.AUTO, false)); Hits hits = searcher.search(query,sort); Yo

RE: Simple question

2009-10-30 Thread Franklin Simmons
To: lucene-net-user@incubator.apache.org Subject: Re: Simple question Hi Franklin. Wich query I use for this search (variable: query)? I don't want any query, I just want the TOP 5 documents ordered by a field. Thank's "Então aproximaram-se os que estavam no barco, e adoraram-no,

Re: Simple question

2009-10-30 Thread André Maldonado
tField("another_field") }; > Hits hits = searcher.search(query,sort); > > > -Original Message- > From: André Maldonado [mailto:andre.maldon...@gmail.com] > Sent: Friday, October 30, 2009 12:57 PM > To: lucene-net-user@incubator.apache.org > Subject: Simple question > &

RE: Simple question

2009-10-30 Thread Franklin Simmons
al Message- From: André Maldonado [mailto:andre.maldon...@gmail.com] Sent: Friday, October 30, 2009 12:57 PM To: lucene-net-user@incubator.apache.org Subject: Simple question Hi. This can be a simple question, but I can't figure out the solution. I need to search my index in something lik

Simple question

2009-10-30 Thread André Maldonado
Hi. This can be a simple question, but I can't figure out the solution. I need to search my index in something like "SELECT TOP 5 ... ORDER BY another_field". But this is an empty query because I want to search in all documents. How can I do it? Thank's