1
votes

I index a folder with PHP docs. now when I do query I get results as

{
    "id":"<getting value>",
    "stream_size":[3984],
    "x_parsed_by":["org.apache.tika.parser.DefaultParser",
      "org.apache.tika.parser.html.HtmlParser"],
    "stream_content_type":["application/octet-stream"],
    "viewport":["width=device-width, initial-scale=1.0"],
    "content_encoding":["windows-1252"],
    "resourcename":["value"],
    "content_type":["text/html; charset=windows-1252"],`enter code here`
    "_version_":1768}

I am not getting the content here in any field. Any idea how to get actual text result here?

1
check your schema file ...does it have stored = true for the fields where you want the actual text... - Abhijit Bashetti
also for all your fields multivalue is true...Check if it really requires for your field otherwise make it false. - Abhijit Bashetti

1 Answers

0
votes

Your fields must be missing the stored attribute.

Please add the stored=true for the fields which you want to have in the response.

stored = true is required if you need read the values/content of a field from the index. For example, if you like to use highlighting feature or if you like to use solr as a database, and not just as a search index.

If stored = true : It simply store the original content and return the original content, if needed.

Please refer for more info : Solr Documentation for field defination