Comments (3)
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.
hi @dbu, I need to develop a CMS,and i have some questions.
- 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.
- 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.
-
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.
-
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 ;-)
-
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)
- Proxy awake on requesting node name
- Binding string with apostrophe using QueryBuilder->literal() crash query HOT 3
- PHP 7 compability issue HOT 4
- How to query @PHPCR\ReferenceMany on Document of same class HOT 2
- Master broken in rebuild HOT 8
- Having problem with 2 ODM managers HOT 1
- GenericDocument.php HOT 1
- Cannot remove nodes with autogenerated @Nodename HOT 1
- translator="attribute" in MetaData is NULL HOT 3
- QueryBuilder: Is it possible to order by id? HOT 3
- Results are not sorted with query builder HOT 4
- QueryBuilder throws InvalidQueryException if node path contains '-<num>e' HOT 1
- Children class Docs vs. Schema defintion HOT 1
- Inheritance for lifecycle callbacks HOT 11
- Array Equality Checking for reordering in UnitOfWork HOT 5
- Classes with names int, string, float, bool... are forbidden in PHP7 HOT 3
- [BUG?] QueryBuilder::setParameter does not exist, so it's not possible to add them during query building HOT 1
- ObjectManager::find requires class name HOT 1
- Symfony 7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpcr-odm.