[ https://issues.apache.org/jira/browse/SOLR-15951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481097#comment-17481097 ]
Ishan Chattopadhyaya commented on SOLR-15951: --------------------------------------------- Here's the PR for this: https://github.com/apache/solr/pull/560 As of this PR, two of the contribs, i.e. Solr Extraction (Tika) and Solr Scripting (Scripting Update Processor) are supported. Here's how a user is expected to use them: Extraction: {code} # Start Solr with extraction & scripting packages loaded bin/solr -c -Dsolr.packages.local.whitelist=solr-scripting,solr-extraction # Create a collection curl "http://localhost:8983/solr/admin/collections?action=CREATE&name=abc&numShards=1" # Put a Tika config file in the configset ./server/scripts/cloud-scripts/zkcli.sh -z localhost:9983 -cmd putfile /configs/abc.AUTOCREATED/solr-default-tika-config.xml ./contrib/extraction/solr-default-tika-config.xml # Add the extraction request handler to the collection curl -X POST -H 'Content-type:application/json' -d "{'add-requesthandler': {'name': '/tika', 'class': 'solr-extraction:org.apache.solr.handler.extraction.ExtractingRequestHandler' 'tika.config':'solr-default-tika-config.xml' 'defaults': {'lowernames': 'true', 'fmap.content': '_text_'}}}" http://localhost:8983/solr/abc/config # Send a PDF document curl 'http://localhost:8983/solr/abc/tika?literal.id=doc1&commit=true' -F "myfile=@example/exampledocs/solr-word.pdf" # Check that the document was parsed and indexed curl "localhost:8983/solr/abc/select?q=*:*" {code} Scripting {code} # Start Solr with extraction & scripting packages loaded bin/solr -c -Dlocal.packages=solr-scripting curl "http://localhost:8983/solr/admin/collections?action=CREATE&name=def&numShards=1" ./server/scripts/cloud-scripts/zkcli.sh -z localhost:9983 -cmd putfile /configs/def.AUTOCREATED/update-script.js ./server/solr/configsets/sample_techproducts_configs/conf/update-script.js curl -X POST -H 'Content-type:application/json' -d '{"add-updateprocessor": {"name": "script", "class": "solr-scripting:org.apache.solr.scripting.update.ScriptUpdateProcessorFactory", "script": "update-script.js"}}' http://localhost:8983/solr/def/config curl -XPOST -d '[{"id": 1, "name_t":"Japan", "test_s": "abc", "capital_s": "Tokyo"}]' "http://localhost:8983/solr/def/update?commit=true&processor=script" # Now check the logs for a log line similar to: # 2022-01-22 13:29:17.544 WARN (qtp1815007437-25) [c:abc s:shard1 r:core_node2 x:abc_shard1_replica_n1] o.a.s.s.u.ScriptUpdateProcessorFactory update-script#processAdd: id=1 {code} > Local packages > -------------- > > Key: SOLR-15951 > URL: https://issues.apache.org/jira/browse/SOLR-15951 > Project: Solr > Issue Type: New Feature > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Ishan Chattopadhyaya > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Introducing a new way to load packages from a trusted location in the > filesystem. > * Packages are loaded from the filesystem. Useful for loading first party > packages from modules/ (or contrib/) directory. > * This mode (of loading packages from filesystem) doesn't go via ZK at all, > and hence this mode can be used to cold start installations with few packages. > * This mode shall help the package management honour immutable > infrastructure/deployments philosophy. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org