2
votes

I indexed word documents in Solr. But When i query with search text , then returning xml file contains searched text but no the name of the file which contains the text,.

For Ex:

Let the word document Printer.doc & models.doc contains the word HP.

When I give HP as query word , the returning XML response must have tags as

<doc>
<str name="filename" >Printer.doc </str>
<str name ="filename" >models.doc</str>

How to ahive this..

I use follwing command to upload and index document

java -Durl=http://localhost:8983/solr/update/extract?literal.id=1 -Dtype=application/word -jar post.jar *.doc

Please tell me how to do ?

1

1 Answers

0
votes

Have you tried mapping *stream_name* to a field?

Otherwise, create a dynamic field and map all the tika metadata fields to that prefix. One of the metadata fields should be file name. Then, you can remap it to whatever you want.