Giter VIP home page Giter VIP logo

Comments (3)

dbu avatar dbu commented on August 24, 2024

are you using jackalope-doctrine-dbal for the phpcr layer? it does have some indexes, but then all things are stored in the same table. if you query instead of looking up nodes by path, this will probably not scale well to large data sets. that said, if you want to profile that and suggest additional indexes i am happy to look at pull requests.

your other option is to run jackrabbit with jackalope-jackrabbit. the jackrabbit server integrates lucene and is supposed to be much more capable.

either way, avoid having too many nodes as direct children of a single node. too many has been determined in benchmarks to be around 10'000. if you have more children, you should split them up somehow (e.g. instead of /parent/child do /parent/c/child, or use the current date, or a hash... whatever fits your use case).

from phpcr-odm.

imsheng avatar imsheng commented on August 24, 2024

hi @dbu, I need to develop a CMS,and i have some questions.

  1. how to Index the "name" field in xml data? because the data is large.
$qb = $documentManager->createQueryBuilder();
$qb->from()->document('Blog\User', 'u');
$qb->where()->eq()->field('u.name')->literal('dtl');
$query = $qb->getQuery();

2.Why use XML instead of JSON?
3.Should these questions be asked at phpcr? https://github.com/phpcr/phpcr
4.I found some solutions about content management. What do you think?
https://github.com/bolt/bolt
https://github.com/agentejo/cockpit

from phpcr-odm.

dbu avatar dbu commented on August 24, 2024
  1. index fields

maybe some of the databases do allow indexes on single xml fields, would need to be tried out.

an other idea that has been discussed but never implemented by anybody is to extend the database connector and have it store some node types in separate tables. you would need to create specific phpcr node types to make that happen however. on phpcr level, the phpcr-odm document classes are not available.

but the easiest would most likely be to use jackalope-jackrabbit as that one is integrating lucene so i assume there are indexes.

another thing is that you should not be searching on thousands of blog posts. PHPCR is useful to build a tree structure, e.g. of year => month => individual blogpost. if you search over everything, there is no point in using PHPCR and it is less performant for search than a solution with doctrine orm and SQL queries on structured data.

  1. because at the time we wrote jackalope-doctrine-dbal, not all databases offered native json support. but this should not concern your application never want to interact with the database directly. that would be like opening the files that mysql writes to.

  2. PHPCR is only the standard for the content repository. jackalope is the implementation. and phpcr-odm is an object mapper on top of the content repository. its the same people working on all of those, so unless its very specific questions its not that important where you ask ;-)

  3. bolt has been around for a while in is used quite a bit afaik. if it can do what you need, then by all means use it, rather than build something yourself from components like phpcr-odm. the components of the content management framework are provided for situations when the needs are too far different from what existing cms can offer. usually you can customize the cms, but there are situations where things are so specific that building something yourself is more efficient than customizing. but building your own cms from these components is a lot more effort than customizing an existing complete cms.

from phpcr-odm.

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.