Is there any reason why a search result might not include highlighting for a
given query, when highlighting is requested, and there's a match?
I'm doing a "text" query of type "phrase", and for 4 out of the 5 hits in
the response, there's a highlight section returned, with proper
highlighting. On one of them, there's no highlighting at all, but when I
look at the field on the source document, I can see at least three instances
of the query (a single word) in the field.
Make sure you have term_vector=with_positions_offsets in your mapping for
the relevant fields.
Otherwise, ES will reanalyze the field and try to match the term searched.
It can miss many occurrences if some stemming is performed.
Is there any reason why a search result might not include highlighting for
a given query, when highlighting is requested, and there's a match?
I'm doing a "text" query of type "phrase", and for 4 out of the 5 hits in
the response, there's a highlight section returned, with proper
highlighting. On one of them, there's no highlighting at all, but when I
look at the field on the source document, I can see at least three instances
of the query (a single word) in the field.
By the way, I have a question for the Lucene community. (In absence of
answer from kimchy, I'll post to Lucene's dev mailing-list).
Why does FieldQuery rewrites queries extensively? (With potential recursion
problems)
Why doesn't they use extractTerms() after one rewrite (which can eliminate
terms from "must_not" clauses from BooleanQuerys etc.)?
Afterall, (in the fast highlighter), it's the matched terms that we are
highlighting...
Make sure you have term_vector=with_positions_offsets in your mapping for
the relevant fields.
Otherwise, ES will reanalyze the field and try to match the term searched.
It can miss many occurrences if some stemming is performed.
Is there any reason why a search result might not include highlighting for
a given query, when highlighting is requested, and there's a match?
I'm doing a "text" query of type "phrase", and for 4 out of the 5 hits in
the response, there's a highlight section returned, with proper
highlighting. On one of them, there's no highlighting at all, but when I
look at the field on the source document, I can see at least three instances
of the query (a single word) in the field.
By the way, I have a question for the Lucene community. (In absence of
answer from kimchy, I'll post to Lucene's dev mailing-list).
Why does FieldQuery rewrites queries extensively? (With potential recursion
problems)
Why doesn't they use extractTerms() after one rewrite (which can eliminate
terms from "must_not" clauses from BooleanQuerys etc.)?
Afterall, (in the fast highlighter), it's the matched terms that we are
highlighting...
Make sure you have term_vector=with_positions_offsets in your mapping for
the relevant fields.
Otherwise, ES will reanalyze the field and try to match the term searched.
It can miss many occurrences if some stemming is performed.
Is there any reason why a search result might not include highlighting
for a given query, when highlighting is requested, and there's a match?
I'm doing a "text" query of type "phrase", and for 4 out of the 5 hits in
the response, there's a highlight section returned, with proper
highlighting. On one of them, there's no highlighting at all, but when I
look at the field on the source document, I can see at least three instances
of the query (a single word) in the field.
By the way, I have a question for the Lucene community. (In absence of
answer from kimchy, I'll post to Lucene's dev mailing-list).
Why does FieldQuery rewrites queries extensively? (With potential
recursion problems)
Why doesn't they use extractTerms() after one rewrite (which can eliminate
terms from "must_not" clauses from BooleanQuerys etc.)?
Afterall, (in the fast highlighter), it's the matched terms that we are
highlighting...
Make sure you have term_vector=with_positions_offsets in your mapping
for the relevant fields.
Otherwise, ES will reanalyze the field and try to match the term
searched.
It can miss many occurrences if some stemming is performed.
Is there any reason why a search result might not include highlighting
for a given query, when highlighting is requested, and there's a match?
I'm doing a "text" query of type "phrase", and for 4 out of the 5 hits
in the response, there's a highlight section returned, with proper
highlighting. On one of them, there's no highlighting at all, but when I
look at the field on the source document, I can see at least three instances
of the query (a single word) in the field.
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.