lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Mastroianni <>
Subject RE: kamikaze
Date Thu, 30 Apr 2009 13:23:57 GMT
Hi Anmol--

Thanks for bringing up the version I was using: when I switched back to
the official jar file, this test passed. The correctness problem only
seems to exist in the snapshot I grabbed.

The only reason I started using a snapshot was that the jar file had
line numbers turned off in the compilation, and no source attachment.
Would it be possible for you to make a version of the jar file with line
numbers turned on, and a source attachment, for your next release?
Without that, it's pretty nearly impossible to debug problems like the
NPE regression.


-----Original Message-----
From: molz [] 
Sent: Wednesday, April 29, 2009 10:58 PM
Subject: RE: kamikaze

Hi Michael,

2 Questions. 

1. What version of Kamikaze are you running with?
2. Can you try the snippet below and let me know if it fails ? I ran it
times and it did not fail. Maybe there is some difference in the
methods you have ? I am still trying to track down if anything is off at
end but does not seem to be.

    public void testMultipleIntersections() 
            ArrayList<OpenBitSet> obs = new ArrayList<OpenBitSet>(); 
            ArrayList<DocIdSet> docs = new ArrayList<DocIdSet>(); 
        Random rand = new Random(System.currentTimeMillis()); 
            int maxDoc = 350000; 
            for(int i=0; i < 3; ++i) 
                    int numdocs = rand.nextInt(maxDoc); 
                    ArrayList<Integer> nums = new 
                    HashSet<Integer> seen = new HashSet<Integer>(); 
                    for (int j = 0; j < numdocs; j++) 
                            int nextDoc = rand.nextInt(maxDoc); 
                                            nextDoc = 
                    obs.add(createObs(nums, maxDoc)); 
            OpenBitSet base = obs.get(0); 
            for(int i = 1; i < obs.size(); ++i) 
            AndDocIdSet ands = new AndDocIdSet(docs); 
            long card1 = base.cardinality(); 
            long card2 = ands.size(); 
            assertEquals(card1, card2); 

    private OpenBitSet createObs(ArrayList<Integer> nums, int maxDoc) {
      OpenBitSet bitSet = new OpenBitSet(maxDoc);
      for(int num:nums)
      return bitSet;
    private DocIdSet createDocSet(ArrayList<Integer> nums) {
      DocSet p4d = DocSetFactory.getDocSetInstance(0, 35000000, 200000,
      for(int num:nums)
      return p4d;

I even tried with the following 

  private DocIdSet createDocSet(ArrayList<Integer> nums) {
      P4DDocIdSet p4d = new P4DDocIdSet();
      for(int num:nums)
      return p4d;

 The NPE you mention in the previous emails has been identified as a bug
will be fixed in the next release (in a day or two). 


View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

This e-mail message, and any attachments, is intended only for the use of the individual or
entity identified in the alias address of this message and may contain information that is
confidential, privileged and subject to legal restrictions and penalties regarding its unauthorized
disclosure and use. Any unauthorized review, copying, disclosure, use or distribution is strictly
prohibited. If you have received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message, and any attachments, from your system. Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message