You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Solange Silva Ajuria <so...@actsa.net> on 2022/03/17 20:17:26 UTC
how can i get the filename of an uploaded file for indexing?
hello,
your collaboration please.
I'm using solr 8.11
I need to configure the requestHandler (/update/extract) to add a field that stores the name of the uploaded file, but I can't find how to do it.
in mager-schema.xml, I define a field :
<field name="name" type="string" multiValued="false" indexed="true" stored="true" />
FieldType string is defined.
But I don't know how to capture the filename and store it in "name"
<requestHandler name="/update/extract"
startup="lazy"
class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
<str name="lowernames">true</str>
<str name="uprefix">ignored_</str>
<str name="fmap.content">content</str>
<str name="fmap.stream_name">name</str>
<str name="processor">uuid,remove-blank,field-name-mutating</str>
</lst>
</requestHandler>
results:
... "name":"file"....
I need something like:
..."name" : "my_file_name.pdf"...
Your help please
Thanks
Solange