Giter Club home page Giter Club logo

Comments (4)

ddorian avatar ddorian commented on May 23, 2024

Now that I reread it, it says "elasticsearch on top of cassandra".
I think that mens _source is saved in cassandra columns, right ?
And how are es-indexes/segments stored ? Is the search time ~equal to normal es ? Is a segment stored in a sstable ?

Meaning more description of internals ?

from elassandra.

vroyer avatar vroyer commented on May 23, 2024

Hi,

Yes, _source is stored in cassandra, each field in a cassandra column stored in SSTable. Lucene files are still managed by the original elasticsearch code, and search features remain unchanged. During the fetch phase of a search, requested field are retreived from the underlying cassandra table through a CQL request.

If you update a cassandra cell, a secondary index rebuild the document from the updated row and index it in elasticsearch. Search then remain unchanged. Of course, to avoid duplicate results if your cassandra replication factor > 1, every document is indexed with a token fields (murmur3 of the partition key), and a token filter is added to every search request to avoid duplicate results. This filter is computed from the routing table of the coordinator node, see token_ranges.

Hope this help.
Thanks'.

from elassandra.

ddorian avatar ddorian commented on May 23, 2024

Do you do something like Datastax Solr does when doing global queries to remove duplicates ?

Due to the fact that you can have several replicas of the same document in your Solr data-center (RF > 1), a proper token range predicate is added to each query before sending it to execution. Each query returns documents with row keys within the appended token range(s). Token ranges are selected in such a way that each token range is handled by exactly one node. Therefore, there is no need for additional duplicate removal and merging the results is a simple and fast union.

I mean, you say you do, but on this page https://github.com/vroyer/elassandra/blob/master/cross-datacenter-replication.md you say:

Looking at cluster state with the elasticHQ plugin, you can notice that the total number of document is twice the one available in kibana. This is because all elassandra nodes are primary, so replicated data are indexed twice in a primary shards.

And isn't elasitcHQ doing just a count there ? Doesn't the count have automatic token filtering ?

Thanks

from elassandra.

vroyer avatar vroyer commented on May 23, 2024

ElasticHQ issue a stats request and get shards information including size on disk for primary shards, so no filtering is involved. Of course, this is erroneous in elassandra, because a shards may contains data for primary and non-primary token ranges.
Thanks.

from elassandra.

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.