No, not directly, but indirectly you can - add &debugQuery=true to your
request and the "explain" section will detail which terms matched in which
fields.
You could probably also implement a custom search component which annotated
each document with the matched field names. In that sense, Solr CAN do it.
-- Jack Krupansky
-----Original Message-----
From: Alireza Salimi
Sent: Thursday, November 22, 2012 6:11 PM
To: solr-user@lucene.apache.org
Subject: Re: Find the matched field in each matched document
Maybe I should say it in different way:
By having documents like above, I want to know what "Robert De Niro" is?
Is it an actor or a movie title.
you can just tell me if Solr can do it or not, it will be enough.
Thanks
On Thu, Nov 22, 2012 at 1:57 PM, Alireza Salimi
<alireza.sal...@gmail.com>wrote:
Hi,
I apologize if i'm asking a duplicate question but I haven't found any
good answer for my problem.
My question is: How can I find out the type of fields that are matched to
the search criteria,
when I search over multip fields.
Assume I have documents like this:
{"title": "Robert De Niro", "actors": []}
{"title": "ronin", "actors": ["robert de niro", "jean reno"]}
{"title": "casino", "actors": ["robert de niro", "Joe Pesci"]}
Here's is the schema:
<field name="actors"
indexed="true"
multiValued="true"
stored="true"
termPositions="true"
termOffsets="true"
termVectors="true"
type="text_general" />
<field name="title"
indexed="true"
multiValued="false"
stored="true"
type="text_general" />
Now after search for "robert de niro" in both "title" and "Actors",
I will have some matches, but my question is: How can I find out
what "robert de niro" is? Is he "an actor" or a "movie title"?
Thanks in advance
--
Alireza Salimi
Java EE Developer
--
Alireza Salimi
Java EE Developer