On Oct 22, 2014, at 3:27 PM, Shawn Heisey <apa...@elyograg.org> wrote:
> On 10/22/2014 11:50 AM, Tom LAMPERT wrote: >> I am attempting to create a script (java script) using the >> StatelessScriptUpdateProcessorFactory feature of solr but I am blocked on >> how to access the current core instance (ultimately to access it's schema)? >> In the wikipedia example the input document is accessible using doc = >> cmd.solrDoc but no other information is given. The aim of the script is to >> apply any filters/tokenisers to the input fields before solr indexes them so >> that the stored values are those after processing, not the original data. >> Any tips would be gratefully received as I cannot find any info on the API >> for this framework... > > I would guess that you'd need to be writing Java code to have this kind > of detail, not javascript. The info in the other replies you received > is talking about Java code. > > Javascript would not be able to execute the analysis on the input anyway > -- that's all Java as well. Ummm… see slides 10 and 11 here: http://www.slideshare.net/erikhatcher/solr-indexing-and-analysis-tricks So yes, you can do analysis tricks in an update script. And it’s incredibly useful and powerful! :) Erik