Highlight on Phrase Prefix Text Query


(davrob) #1

Hi,

I am doing a PHRASE_PREFIX TextQuery on a non-analysed field. But
when I look for the highlights using:

highlightFieldsMap = hit.getHighlightFields()

I get nothing. My ES version is 16.2. Highlights for
QueryStringQuery work fine.

Best Regards,

David.


(Shay Banon) #2

Can you try with 0.17? Do you have term vectors on the field you highlight?

On Mon, Aug 8, 2011 at 5:58 PM, davrob2 daviroberts@gmail.com wrote:

Hi,

I am doing a PHRASE_PREFIX TextQuery on a non-analysed field. But
when I look for the highlights using:

highlightFieldsMap = hit.getHighlightFields()

I get nothing. My ES version is 16.2. Highlights for
QueryStringQuery work fine.

Best Regards,

David.


(davrob) #3

Hi,

This seems to be working ok now, not sure why, I didn't change
versions from 0.16.2. I'm using the normal highlighter, rather than
setting "term_vector" : "with_positions_offsets" in the mapping.

Will update this thread if I get to the bottom of the issue.

David.

On Aug 8, 5:36 pm, Shay Banon kim...@gmail.com wrote:

Can you try with 0.17? Do you have term vectors on the field you highlight?

On Mon, Aug 8, 2011 at 5:58 PM, davrob2 davirobe...@gmail.com wrote:

Hi,

I am doing a PHRASE_PREFIX TextQuery on a non-analysed field. But
when I look for the highlights using:

highlightFieldsMap = hit.getHighlightFields()

I get nothing. My ES version is 16.2. Highlights for
QueryStringQuery work fine.

Best Regards,

David.


(system) #4