Does the parent / child or nested docs could help you ?
Does the highlight function could help you ?
Another idea could be to store a "technical" field (or use multifield), and
put in it something like "1:bob" with a keyword analyzer (or no analyzer at
all) and highlight this field.
BTW, if you are looking for students, why are you indexing documents ?
I am not sure if it is a good idea to create parent child document,
where in I dont require any fields in the parent mapping.
The highlight function just helps me in the highlighting part. I need
to retrieve the id [not for displaying], for verification.
The student was just an example to state my problem, not my real
issue..
Does the parent / child or nested docs could help you ?
Does the highlight function could help you ?
Another idea could be to store a "technical" field (or use multifield), and
put in it something like "1:bob" with a keyword analyzer (or no analyzer at
all) and highlight this field.
BTW, if you are looking for students, why are you indexing documents ?
Did you implement a solution for this? I have a similar need where in
search needs to happen on a field in a multi valued object, but from the
hit highlights I would like to identify which object in the multi valued
field got the match. Basically instead of just the hightlight fragments,
would like to get back additional fields (for example, a unique id
associated with the field in the multi valued object) included in the
highlights results.
Thinking of extending highlights query syntax such that you can specify
additional decorator fields along with the field you want to highlight.
These fields and the values of the fields will then be included in each
hightlight fragment. Say a Key/Value pair of FieldName and FieldValue of
all the aditional data. That would allow one to include the "id" field in
my use case along with the hit highlights.
Let me know if it makes sense, and I would go ahead and implement this.
On Friday, May 11, 2012 2:45:11 AM UTC-7, nmz wrote:
I am not sure if it is a good idea to create parent child document,
where in I dont require any fields in the parent mapping.
The highlight function just helps me in the highlighting part. I need
to retrieve the id [not for displaying], for verification.
The student was just an example to state my problem, not my real
issue..
Does the parent / child or nested docs could help you ?
Does the highlight function could help you ?
Another idea could be to store a "technical" field (or use multifield),
and
put in it something like "1:bob" with a keyword analyzer (or no analyzer
at
all) and highlight this field.
BTW, if you are looking for students, why are you indexing documents ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.