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
.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
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
@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
.
>>
>> 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
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
>
>
: 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
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
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("
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
>
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
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
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,
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
>
&
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
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
16 matches
Mail list logo