Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SolR query and document download

Solved Go to solution

SolR query and document download

New Contributor

I am new to nifi and SolR. I am trying to create a search engine for emails. I am using nifi flow and putsolrcontentstream to index the emails. When I query in SolR, I am able to see the results. But I am not able to get the path of the emails.
Is there a way to get the file path displayed in the search result, so that a user can download the required file?
I also see that there is a processor called “ExtractMediaContent”. This processor gives absolute path of the file but search feature is lost with this processor.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: SolR query and document download

@Narendra Dev

When you defined your collection fields, did you added the path as a filed? Or you are using dynamic fields?

As an example on your core managed-schema you should have a filed like this:

<field name="path" type="string" indexed="true" stored="true" required="true" multiValued="false" />

If you are using dynamic fields make sure the field type is stored otherwise it wont be retrieved when you search.

And last but not least you should make sure you are passing the path as part of the json/xml that is being put to solr.

HTH

2 REPLIES 2
Highlighted

Re: SolR query and document download

@Narendra Dev

When you defined your collection fields, did you added the path as a filed? Or you are using dynamic fields?

As an example on your core managed-schema you should have a filed like this:

<field name="path" type="string" indexed="true" stored="true" required="true" multiValued="false" />

If you are using dynamic fields make sure the field type is stored otherwise it wont be retrieved when you search.

And last but not least you should make sure you are passing the path as part of the json/xml that is being put to solr.

HTH

Re: SolR query and document download

New Contributor

Thank you for the help. I will try it out as per your suggestion.

Don't have an account?
Coming from Hortonworks? Activate your account here