user2520969
user2520969

Reputation: 1389

Show results with solr

i'm using solr http://lucene.apache.org/solr/

I use a tutorial per index my collection and execute some simple queries via the graphical interface, avaiable at the address http://localhost:8983/solr/demo/browse.

But, now i would execute some queries via command line, so i use this:

curl http://localhost:8983/solr/demo/query -d '
q=*:*'

But, in doing so, i only obtain the sorted list of the documents, showing the entire contents of the documents, without the scoring result of each one.

So, how can i do to show only the title and the score of them?

Upvotes: 0

Views: 471

Answers (1)

YoungHobbit
YoungHobbit

Reputation: 13402

You need to use the fl query parameter which means field list. score for getting the score. e.g. fl=title,score. Assuming you are storing title as title.

curl http://localhost:8983/solr/demo/query -d 'q=*:*&fl=title,score'

For more information: Common Query Parameters

Upvotes: 2

Related Questions