Showtim3
Showtim3

Reputation: 976

How to get the fields that match the request?

I need your help to get more information in my solR query's response.

i've got a simple input text which allows me to query several fields in the same query.

So my query looks like this "q=email:martyn+OR+name:martynn+OR+commercial:martyn ..."

Is it possible in the response to know the fields where "martynn" has been found?

Upvotes: 2

Views: 107

Answers (1)

Bohemian
Bohemian

Reputation: 425418

Add this to your query string:

hl=true&hl.fl=*

which tells solr to highlight the fields where the matches were made.

This solr wiki page describes all the highlighting parameters available with solr.

Upvotes: 2

Related Questions