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 specified fields from each Solr document returned by the search?
相关问题
- JCR-SQL - contains function doesn't escape spe
- Solr Deduplication (dedupe) giving all zeros in si
- Solr (Sunspot), max results more than 30?
- Match lucene entire field exact value
- How to rank documents using tfidf similairty in lu
相关文章
- Solr - _version_ field must exist in schema and be
- SolrNet - Score always 0
- How can use the /export request handler via SolrJ?
- request counting for documents in apache solr
- How to search records between two coordinates usin
- Boost result by specified search term on top
- CakePHP with Lucene
- Faceted searching and categories in MySQL and Solr
From the Solr Admin home page, click on "Full Interface". On that page there is a box called "Fields to Return". You can list the you want here (comma-separated). "*" means all fields.
The best way is to run the query from Admin concole. When we run it, it also provides the actuall SQL query executed. Just copy the query and use it.
About the question: select specific fields from the table. In the admin console look for 'FL' text box. write the field names you want to retrieve, comma sapereted. Hit the 'Execute Query' button. Top right side the SQL will be available.
Generated Query: ......select?fl=FIELDNAME&indent=on&q=:&wt=json
This link has fl parameter: fl is a field list, which will display the specified fields from the indexed list.
you can simply pass fl parameter with required fields name in your query.
&fl=field1,field2,field3&query=:
your response documents contains only mentioned fields.