Returns nothing when sorting

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Returns nothing when sorting

Michel Nadeau
Hi !

I have a quite small Lucene 3.0.0 index with around 400,000 documents in it.

I'm trying to sort my results like this :

TopDocs td;
td = searcher.search(q, cluCF, 10, cluSort);
ScoreDoc[] hits = td.scoreDocs;

My cluCF is a ChainedFilter containing at least one filter, and cluSort is a
float type.

I'm not sure where to start - my Lucene application is a Java Web Server
(multithread), and when querying it with sorting, it just returns nothing;
no error, no crash, but no results. If I do the same query/filter without
sorting, I get results.

Anything I could try?

Thanks,

- Mike
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Returns nothing when sorting

Michel Nadeau
By the way the same search + filter combination but with a sort on another
field (string) works. It seems only the float sort isn't working. The float
sort is working correctly in other conditions though.

I'm very puzzled !

- Mike
[hidden email]


On Fri, Dec 11, 2009 at 2:52 AM, Michel Nadeau <[hidden email]> wrote:

> Hi !
>
> I have a quite small Lucene 3.0.0 index with around 400,000 documents in
> it.
>
> I'm trying to sort my results like this :
>
> TopDocs td;
> td = searcher.search(q, cluCF, 10, cluSort);
> ScoreDoc[] hits = td.scoreDocs;
>
> My cluCF is a ChainedFilter containing at least one filter, and cluSort is
> a float type.
>
> I'm not sure where to start - my Lucene application is a Java Web Server
> (multithread), and when querying it with sorting, it just returns nothing;
> no error, no crash, but no results. If I do the same query/filter without
> sorting, I get results.
>
> Anything I could try?
>
> Thanks,
>
> - Mike
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: Returns nothing when sorting

Ian Lea
Hi


Sounds very odd.  I suggest you break it down into the smallest
self-contained program/test case that demonstrates the problem.  If
that doesn't help you find the problem, post it here.


--
Ian.


On Fri, Dec 11, 2009 at 8:10 AM, Michel Nadeau <[hidden email]> wrote:

> By the way the same search + filter combination but with a sort on another
> field (string) works. It seems only the float sort isn't working. The float
> sort is working correctly in other conditions though.
>
> I'm very puzzled !
>
> - Mike
> [hidden email]
>
>
> On Fri, Dec 11, 2009 at 2:52 AM, Michel Nadeau <[hidden email]> wrote:
>
>> Hi !
>>
>> I have a quite small Lucene 3.0.0 index with around 400,000 documents in
>> it.
>>
>> I'm trying to sort my results like this :
>>
>> TopDocs td;
>> td = searcher.search(q, cluCF, 10, cluSort);
>> ScoreDoc[] hits = td.scoreDocs;
>>
>> My cluCF is a ChainedFilter containing at least one filter, and cluSort is
>> a float type.
>>
>> I'm not sure where to start - my Lucene application is a Java Web Server
>> (multithread), and when querying it with sorting, it just returns nothing;
>> no error, no crash, but no results. If I do the same query/filter without
>> sorting, I get results.
>>
>> Anything I could try?
>>
>> Thanks,
>>
>> - Mike
>> [hidden email]
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]