[
https://issues.apache.org/jira/browse/SOLR-8166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14970593#comment-14970593
]
ASF GitHub Bot commented on SOLR-8166:
--------------------------------------
Github user uschindler commented on the pull request:
https://github.com/apache/lucene-solr/pull/206#issuecomment-150497999
Hi,
a useful alternative to using commons-beanutils is using the JDK internal
bean classes. See
https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java#L166-L232
for an example. We read the properties of MXBeans in the SystemInfoHandler
here. You can get a BeanInfo from the class and then use the property
descriptors to get/set properties. And that is what you are doing.
Because the JDK code is partly buggy for historical reasons, make sure to
use the correct flags added with JDK 7 when inspecting and getting the property
descriptors (disabling caches which are broken).
> Introduce possibility to configure ParseContext in
> ExtractingRequestHandler/ExtractingDocumentLoader
> ----------------------------------------------------------------------------------------------------
>
> Key: SOLR-8166
> URL: https://issues.apache.org/jira/browse/SOLR-8166
> Project: Solr
> Issue Type: Improvement
> Components: contrib - Solr Cell (Tika extraction)
> Affects Versions: 5.3
> Reporter: Andriy Binetsky
> Assignee: Uwe Schindler
>
> Actually there is no possibility to hand over some additional configuration
> by document extracting with ExtractingRequestHandler/ExtractingDocumentLoader.
> For example I need to put org.apache.tika.parser.pdf.PDFParserConfig with
> "extractInlineImages" set to true in ParseContext to trigger extraction/OCR
> recognizing of embedded images from pdf.
> It would be nice to have possibility to configure created ParseContext due
> xml-config file like TikaConfig does.
> I would suggest to have following:
> solrconfig.xml:
> <requestHandler name="/update/extract"
> class="org.apache.solr.handler.extraction.ExtractingRequestHandler">
> <str name="parseContext.config">parseContext.config</str>
> </requestHandler>
> parseContext.config:
> <entries>
> <entry class="org.apache.tika.parser.pdf.PDFParserConfig"
> value="org.apache.tika.parser.pdf.PDFParserConfig">
> <property name="extractInlineImages" value="true"/>
> </entry>
> </entries>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]