Getting specific fields in a Solr request?

I am running a Solr instance on Jetty, and when I search using the Solr admin panel, it returns the entire document. What should I do to get only the specified fields from each Solr document returned by the search?

+42
lucene solr
Nov 05 '08 at
source share
4 answers
/?q=query&fl=field1,field2,field3 
+75
Nov 14 '08 at 11:58
source share

On the Solr admin home page, click Full Interface. On this page there is a field called "Fields for return". You can specify what you want here (separated by a comma). "*" means all fields.

+8
Dec 05 '08 at 20:28
source share
 http://xx.xxx.xx.xx:8983/solr/corename/select?indent=on&q=*:*&wt=json&fl=ImageID,Imagepath,Category 

This link has the parameter fl: fl - a list of fields in which the specified fields from the indexed list will be displayed.

+1
Dec 28 '17 at 12:55
source share

The best way is to run a request from the admin concole. When we run it, it also provides an executable SQL query. Just copy the request and use it.

About the question: select specific fields from the table. In the Admin console, find the text field "FL". enter the names of the fields you want to receive, comma. Click on the “Fill Request” button. The top right of the SQL will be available.

Query Generated: ...... select? fl = FIELDNAME & indent = on & q =: & wt = json

0
Jul 05 '17 at 9:50
source share



All Articles