Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "ExtractingRequestHandler" page has been changed by HossMan. The comment on this change is: fix link for renamed page, and start using java syntax formatting in example snippets. http://wiki.apache.org/solr/ExtractingRequestHandler?action=diff&rev1=59&rev2=60 -------------------------------------------------- <!> NOTE, this literally streams the file as the body of the POST, which does not, then, provide info to Solr about the name of the file. == SolrJ == - Use the ContentStreamUpdateRequest (see SolrExampleTests.java for full example): + Use the !ContentStreamUpdateRequest (see ContentStreamUpdateRequestExample for a full example): - {{{ + {{{#!java ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); up.addFile(new File("mailing_lists.pdf")); up.setParam("literal.id", "mailing_lists.pdf"); @@ -214, +214 @@ }}} If you want to set a '''multiValued''' field, use the ''ModifiableSolrParams'' class like this: - {{{ + + {{{#!java ModifiableSolrParams p = new ModifiableSolrParams(); for(String value : values) { p.add(ExtractingParams.LITERALS_PREFIX + "field", value);
