lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <swhite4...@gmail.com>
Subject How to find out which fields a search came from
Date Tue, 31 Mar 2015 21:42:24 GMT
Hi folks,

When I get my hits back from Solr, is there a way to find out into which
fields my search term matched in?

For example, if the indexed document is:

  doc_1:
    title = From Russia with Love
    director = Terence Young
    starting = Sean Connery, Redro Amendariz, Lotte Lenya,
    music_by = John Barry
doc_2:
    title = Goldfinger
    director = Guy Hamilton
    starting = Sean Connery, Honor Blackman, Gert Frobe
    music_by = John Barry
doc_3:
    title = Skyfall
    director = Sam Mendes
    starting = Daniel Craig, Javier Bardem, Ralph Fiennes
    music_by = Thomas Newman

If my search term is "love john barry guy", Solr will tell me I have a hit
in doc_1 and doc_2.  But what I also need to know in which field my search
terms match.  How can Solr tell me that doc_1::title and doc_1::music_by
and doc_2::music_by are where my search terms matched?

It looks to me that the highlighter does this, but I need this feature
without enabling the highlighter.

Thanks!

Steve

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message