Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieving specific fields in a Solr query?

Tags:

solr

lucene

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?

like image 753
Mohit Ranka Avatar asked Nov 05 '08 11:11

Mohit Ranka


People also ask

How do I search for a specific field in Solr?

About the question: search specific field value from the Solr. In the admin console look for 'Q' text box. write the yourfield=value OR yourfield:value. Hit the 'Execute Query' button.

How use contains in Solr query?

1)How to search solr for contains You can store data into string type of field or text type of field. In string field by wild card searching you can achieve the result (E.g field1:"John*"). Also you should look into different types of analyzers.

How do I query in Solr collection?

You can search for "solr" by loading the Admin UI Query tab, enter "solr" in the q param (replacing *:* , which matches all documents), and "Execute Query". See the Searching section below for more information. To index your own data, re-run the directory indexing command pointed to your own directory of documents.

What is filter query in Solr?

Solr provides Query (q parameter) and Filter Query (fq parameter) for searching. The query (q parameter), as the name suggests, is the main query used for searching. Example. q = title:james. Filter queries are used alongside query (q parameter) to limit results of queries using additional filters.


1 Answers

/?q=query&fl=field1,field2,field3 
like image 172
Andrew Ingram Avatar answered Sep 19 '22 17:09

Andrew Ingram