GithubHelp home page GithubHelp logo

Comments (4)

tnine avatar tnine commented on August 23, 2024

Hey Jake,
I've investigated this further, and I have determined the issue. The LuceneTermEnum does not properly match the spec when enumerating numeric trie terms. I've added some debug output when using the default RamDirectory on version 2.9.3 and running the TestNumericRangeQuery32 tests. I receive this enumeration order when the "term()" method is invoked on their SegmentTermEnum class.

Returning term for field 'field8' hex value is : 60077f7e6814
Returning term for field 'field8' hex value is : 60077f7e6814
Returning term for field 'field8' hex value is : 60077f7e6814
Returning term for field 'field8' hex value is : 60077f7e6814
Returning term for field 'field8' hex value is : 68037f7f00
Returning term for field 'field8' hex value is : 68037f7f00
Returning term for field 'field8' hex value is : 68037f7f00
Returning term for field 'field8' hex value is : 68037f7f00
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f4e
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f4e
Returning term for field 'field8' hex value is : 68037f7f4e
Returning term for field 'field8' hex value is : 68037f7f68
Returning term for field 'field8' hex value is : 68037f7f4e
Returning term for field 'field8' hex value is : 68037f7f68
Returning term for field 'field8' hex value is : 68037f7f68
Returning term for field 'field8' hex value is : 6804000002
Returning term for field 'field8' hex value is : 68037f7f68
Returning term for field 'field8' hex value is : 70017f7f
Returning term for field 'field8' hex value is : 70017f7f
Returning term for field 'field8' hex value is : 70017f7f
Returning term for field 'field8' hex value is : 70017f7f
Returning term for field 'field8' hex value is : 78007f
Returning term for field 'field8' hex value is : 78007f
Returning term for field 'field8' hex value is : 78007f
Returning term for field 'field8' hex value is : 78007f
Returning term for field 'field8' hex value is : 780100
Returning term for field 'field8' hex value is : 780100
Returning term for field 'field8' hex value is : 780100
Returning term for field 'field8' hex value is : 780100
Returning term for field 'field8' hex value is : 780100
Returning term for field 'field8' hex value is : 780100

These are the results with LucandraTermEnum

Returning term for field 'field8' hex value is : 60077f7e6814
Returning term for field 'field8' hex value is : 600809433244
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f34
Returning term for field 'field8' hex value is : 68037f7f4e
Returning term for field 'field8' hex value is : 68037f7f4e
Returning term for field 'field8' hex value is : 68037f7f68
Returning term for field 'field8' hex value is : 68037f7f68
Returning term for field 'field8' hex value is : 6804000002
Returning term for field 'field8' hex value is : 6804046008
Returning term for field 'field8' hex value is : 6804046008

As you can see the results are not properly enumerated. Given that you're using a Tree for the cached terms, they should be ordered properly after insert. It seems that this may be an issue with the way loadTerms is invoked

from solandra.

tnine avatar tnine commented on August 23, 2024

Hi Jake,
I've been digging into this one all day. After searching a bit more, I found an issue in my local copy of the TermEnum which I have corrected. This resolves the enumeration issue I described above. However, the documents are not returned in "default" order. I.E. the order they were added to the index as the test expects. Im assuming this is a bug in the LucandraTermDocs, but I'm having a hard time locating it. Thoughts?

from solandra.

tnine avatar tnine commented on August 23, 2024

I've updated my test case on my fork that shows the issue.

http://github.com/tnine/Lucandra/blob/master/test/lucandra/NumericRangeTests.java

It appears to still be term enum related. The calls to IndexReader.addDocument are occurring in a different order than the insertion.

from solandra.

tjake avatar tjake commented on August 23, 2024

fixed.

from solandra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.