You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2016/11/09 21:34:55 UTC
Docvalues sorting on missing fields (at least int) seems incorrect
While working on SOLR-9166 against trunk, I noticed this and wondered
if anyone has any input. It looks like missing values are being sorted
as though they had zero (or whatever the default is).
I have a field:
<field name="intdvnodef" type="int" indexed="false" stored="false"
docValues="true" />
I get the same result if indexed="true" FWIW.
For this query:
q=*:*&sort=intdvnodef asc,id asc
I get:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">328</int>
</lst>
<result name="response" numFound="9" start="0">
<doc>
<int name="id">2</int>
</doc>
<doc>
<int name="id">3</int>
<int name="intdvnodef">0</int>
</doc>
<doc>
<int name="id">4</int>
</doc>
<doc>
<int name="id">6</int>
</doc>
<doc>
<int name="id">7</int>
<int name="intdvnodef">0</int>
</doc>
<doc>
<int name="id">8</int>
</doc>
<doc>
<int name="id">1</int>
<int name="intdvnodef">1</int>
</doc>
<doc>
<int name="id">5</int>
<int name="intdvnodef">5</int>
</doc>
<doc>
<int name="id">9</int>
<int name="intdvnodef">9</int>
</doc>
</result>
</response>
Should I raise a JIRA? I have a trivial junit test illustrating this.
Erick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Docvalues sorting on missing fields (at least int) seems incorrect
Posted by Erick Erickson <er...@gmail.com>.
Done, see: https://issues.apache.org/jira/browse/LUCENE-7548
Let me know if there's anything else I can supply, and I'll be happy
to test any patches.
Thanks!
Erick
On Wed, Nov 9, 2016 at 3:27 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> Yes please open a Lucene issue!
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Wed, Nov 9, 2016 at 4:34 PM, Erick Erickson <er...@gmail.com> wrote:
>> While working on SOLR-9166 against trunk, I noticed this and wondered
>> if anyone has any input. It looks like missing values are being sorted
>> as though they had zero (or whatever the default is).
>>
>> I have a field:
>> <field name="intdvnodef" type="int" indexed="false" stored="false"
>> docValues="true" />
>>
>> I get the same result if indexed="true" FWIW.
>>
>> For this query:
>> q=*:*&sort=intdvnodef asc,id asc
>>
>> I get:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <response>
>> <lst name="responseHeader">
>> <int name="status">0</int>
>> <int name="QTime">328</int>
>> </lst>
>> <result name="response" numFound="9" start="0">
>> <doc>
>> <int name="id">2</int>
>> </doc>
>> <doc>
>> <int name="id">3</int>
>> <int name="intdvnodef">0</int>
>> </doc>
>> <doc>
>> <int name="id">4</int>
>> </doc>
>> <doc>
>> <int name="id">6</int>
>> </doc>
>> <doc>
>> <int name="id">7</int>
>> <int name="intdvnodef">0</int>
>> </doc>
>> <doc>
>> <int name="id">8</int>
>> </doc>
>> <doc>
>> <int name="id">1</int>
>> <int name="intdvnodef">1</int>
>> </doc>
>> <doc>
>> <int name="id">5</int>
>> <int name="intdvnodef">5</int>
>> </doc>
>> <doc>
>> <int name="id">9</int>
>> <int name="intdvnodef">9</int>
>> </doc>
>> </result>
>> </response>
>>
>> Should I raise a JIRA? I have a trivial junit test illustrating this.
>>
>> Erick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Docvalues sorting on missing fields (at least int) seems incorrect
Posted by Michael McCandless <lu...@mikemccandless.com>.
Yes please open a Lucene issue!
Mike McCandless
http://blog.mikemccandless.com
On Wed, Nov 9, 2016 at 4:34 PM, Erick Erickson <er...@gmail.com> wrote:
> While working on SOLR-9166 against trunk, I noticed this and wondered
> if anyone has any input. It looks like missing values are being sorted
> as though they had zero (or whatever the default is).
>
> I have a field:
> <field name="intdvnodef" type="int" indexed="false" stored="false"
> docValues="true" />
>
> I get the same result if indexed="true" FWIW.
>
> For this query:
> q=*:*&sort=intdvnodef asc,id asc
>
> I get:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">328</int>
> </lst>
> <result name="response" numFound="9" start="0">
> <doc>
> <int name="id">2</int>
> </doc>
> <doc>
> <int name="id">3</int>
> <int name="intdvnodef">0</int>
> </doc>
> <doc>
> <int name="id">4</int>
> </doc>
> <doc>
> <int name="id">6</int>
> </doc>
> <doc>
> <int name="id">7</int>
> <int name="intdvnodef">0</int>
> </doc>
> <doc>
> <int name="id">8</int>
> </doc>
> <doc>
> <int name="id">1</int>
> <int name="intdvnodef">1</int>
> </doc>
> <doc>
> <int name="id">5</int>
> <int name="intdvnodef">5</int>
> </doc>
> <doc>
> <int name="id">9</int>
> <int name="intdvnodef">9</int>
> </doc>
> </result>
> </response>
>
> Should I raise a JIRA? I have a trivial junit test illustrating this.
>
> Erick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org