xrow / ezpublish-solrdocs-bundle
creating solr documents
Installs: 433
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 14
Forks: 2
Open Issues: 0
Type:import
Requires
- php: >=5.3.0
- nelmio/solarium-bundle: 2.*
This package is auto-updated.
Last update: 2024-11-16 03:17:11 UTC
README
php ezpublish/console xrow:solrdocs:testimport
Odata Validator
http://services.odata.org/validation/
Test services
http://services.odata.org/V4/OData/OData.svc/
Odata Gui Tool
Testing XMLs
php ezpublish/console xrow:odata:validate --source="http://services.odata.org/V4/OData/OData.svc/Products?\$top=20&\$format=atom"
or
php ezpublish/console xrow:odata:validate --source="vendor/xrow/ezpublish-solrdocs-bundle/Lib/c1test.xml"
or
php ezpublish/console xrow:odata:import --source="<linkToSource>" --class="odata4product" --offset=0 --limit=1000 --conc=<1-4 processes threaded> --location="<location slash seperated>" --clean="[no|location|class|all]"
Add routes to ezpublish/config/routes.yml:
xrow_ez_publish_solr_docs_homepage: path: /solrdoc/{name} defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:index } xrow_ez_publish_solr_docs_showdoc: path: /solrdocview/{remoteid} defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:solrDocView } xrow_ez_publish_universalsearch: path: /universalsearch defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:solrDocUniversalSearch } xrow_ez_publish_universalsearch_slash: path: /universalsearch/ defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:solrDocUniversalSearch } xrow_ez_publish_universalsearch_withsearchtext: path: /universalsearch/{searchtext} defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:solrDocUniversalSearch } xrow_ez_publish_universalsearch_ajax: path: /universalsearch_ajax defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:solrDocUniversalSearchAjax } xrow_ez_publish_universalsearch_ussuggest: path: /autosuggest/{config}/{searchtext} defaults: { _controller: xrowEzPublishSolrDocsBundle:Default:solrDocUniversalSearchAutoSuggest }
Components of this Bundle
- SOLR Storage Handler
- Import API
- Standard Import Scripts for formats like OData 4.0
The Import Model
We decided that it is neccary to abstarct the Import in the most simple way.
$source = new OData\Source( $url ); $import = new Import\Process( $location, $contentType, $source ); if( $import->validate() ){ $import->import(); }
A new Source is defined to implement Iterator, Countable, Sourceable to get properly imported though the Importer.