You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Candide Kemmler <ca...@palacehotel.org> on 2009/07/02 22:24:12 UTC

DocSlice andNotSize

Hi,

I have a simple question rel the DocSlice class. I'm trying to use the  
(very handy) set operations on DocSlices and I'm rather confused by  
the way it behaves.

I have 2 DocSlices, atlDocs which, by looking at the debugger, holds a  
"docs" array of ints of size 1; the second DocSlice is btlDocs, with a  
"docs" array of ints of size 67. I know that atlDocs is a subset of  
btlDocs, so the doing btlDocs.andNotSize(atlDocs) should really return  
66.

But it's returning 10.

Any idea what I'm understanding wrong here?

Thanks in advance.

Candide

Re: DocSlice andNotSize

Posted by Yonik Seeley <yo...@lucidimagination.com>.
I've opened a JIRA issue for this:
https://issues.apache.org/jira/browse/SOLR-1260

And what I meant by  "set operations were only designed for DocSets
(as opposed to DocLists)" I meant that Solr has never done set
operations on DocList objects AFAIK, and so there aren't any tests for
it.

-Yonik
http://www.lucidimagination.com



On Thu, Jul 2, 2009 at 4:24 PM, Candide Kemmler<ca...@palacehotel.org> wrote:
> Hi,
>
> I have a simple question rel the DocSlice class. I'm trying to use the (very
> handy) set operations on DocSlices and I'm rather confused by the way it
> behaves.
>
> I have 2 DocSlices, atlDocs which, by looking at the debugger, holds a
> "docs" array of ints of size 1; the second DocSlice is btlDocs, with a
> "docs" array of ints of size 67. I know that atlDocs is a subset of btlDocs,
> so the doing btlDocs.andNotSize(atlDocs) should really return 66.
>
> But it's returning 10.
>
> Any idea what I'm understanding wrong here?
>
> Thanks in advance.
>
> Candide
>

Re: DocSlice andNotSize

Posted by Ben <be...@autonomic.net>.
DocSet isn't an object it's an interface. The DocSlice class 
*implements* DocSet.
What you're saying about set operations not working for DocSlice but 
working for DocSet then doesn't make any sense... can you clarify?

The failure of these set operations to work as expected is confusing the 
hell out of me too!

Thanks
Ben


Yonik Seeley wrote:
> On Thu, Jul 2, 2009 at 4:24 PM, Candide Kemmler<ca...@palacehotel.org> wrote:
>   
>> I have a simple question rel the DocSlice class. I'm trying to use the (very
>> handy) set operations on DocSlices and I'm rather confused by the way it
>> behaves.
>>
>> I have 2 DocSlices, atlDocs which, by looking at the debugger, holds a
>> "docs" array of ints of size 1; the second DocSlice is btlDocs, with a
>> "docs" array of ints of size 67. I know that atlDocs is a subset of btlDocs,
>> so the doing btlDocs.andNotSize(atlDocs) should really return 66.
>>
>> But it's returning 10.
>>     
>
> The short answer is that all of the set operations were only designed
> for DocSets (as opposed to DocLists).
> Yes, perhaps DocList should not have extended DocSet...
>
> -Yonik
> http://www.lucidimagination.com
>   


Re: DocSlice andNotSize

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Jul 2, 2009 at 4:24 PM, Candide Kemmler<ca...@palacehotel.org> wrote:
> I have a simple question rel the DocSlice class. I'm trying to use the (very
> handy) set operations on DocSlices and I'm rather confused by the way it
> behaves.
>
> I have 2 DocSlices, atlDocs which, by looking at the debugger, holds a
> "docs" array of ints of size 1; the second DocSlice is btlDocs, with a
> "docs" array of ints of size 67. I know that atlDocs is a subset of btlDocs,
> so the doing btlDocs.andNotSize(atlDocs) should really return 66.
>
> But it's returning 10.

The short answer is that all of the set operations were only designed
for DocSets (as opposed to DocLists).
Yes, perhaps DocList should not have extended DocSet...

-Yonik
http://www.lucidimagination.com