Highlighting does not work with FLT


(Raul, Jr. Martinez) #1

Hello,

The highlighting feature does not seem to work when I use Fuzzy Like
This query. I'm not sure if the way I constructed the query is correct
or not. Please point out to me what I'm missing in order for the
highlighting feature to work?

Using "query_string" the highlighting works --> https://gist.github.com/1065424

Using "flt" the highlighting is not working --> https://gist.github.com/1065403

Following are the mapping or articles and
{
"articles": {
"properties": {
"tags": {
"index": "not_analyzed",
"type": "string"
},
"id": {
"type": "string"
},
"content": {
"store": "yes",
"type": "string"
},
"dtmPosted": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"title": {
"store": "yes",
"type": "string"
},
"classId": {
"type": "string"
},
"postedBy": {
"index": "not_analyzed",
"type": "string"
},
"url": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
}
}

{
"adverts": {
"properties": {
"id": {
"type": "string"
},
"content": {
"store": "yes",
"type": "string"
},
"dtmPosted": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"title": {
"store": "yes",
"type": "string"
},
"price": {
"store": "yes",
"null_value": 0,
"type": "double"
},
"keywords": {
"index_name": "keyword",
"type": "string"
},
"classId": {
"type": "string"
},
"postedBy": {
"index": "not_analyzed",
"type": "string"
},
"categories": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"currency": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
}
}

THank you

Raul


(Nicolas Lalevée) #2

I had some issue with a prefix query. It has been fixed with my patch:

Probably some patch will be needed for the fuzzy query.

Nicolas

Le 6 juil. 2011 à 01:20, rmartinez a écrit :

Hello,

The highlighting feature does not seem to work when I use Fuzzy Like
This query. I'm not sure if the way I constructed the query is correct
or not. Please point out to me what I'm missing in order for the
highlighting feature to work?

Using "query_string" the highlighting works --> https://gist.github.com/1065424

Using "flt" the highlighting is not working --> https://gist.github.com/1065403

Following are the mapping or articles and
{
"articles": {
"properties": {
"tags": {
"index": "not_analyzed",
"type": "string"
},
"id": {
"type": "string"
},
"content": {
"store": "yes",
"type": "string"
},
"dtmPosted": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"title": {
"store": "yes",
"type": "string"
},
"classId": {
"type": "string"
},
"postedBy": {
"index": "not_analyzed",
"type": "string"
},
"url": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
}
}

{
"adverts": {
"properties": {
"id": {
"type": "string"
},
"content": {
"store": "yes",
"type": "string"
},
"dtmPosted": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"title": {
"store": "yes",
"type": "string"
},
"price": {
"store": "yes",
"null_value": 0,
"type": "double"
},
"keywords": {
"index_name": "keyword",
"type": "string"
},
"classId": {
"type": "string"
},
"postedBy": {
"index": "not_analyzed",
"type": "string"
},
"categories": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"currency": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
}
}

THank you

Raul


(Raul, Jr. Martinez) #3

Hello,

Apologies for not updating this thread. I fixed the highlighting issue
by making sure to add at following parameters in "title" and
"content"

term_vector = with_positions_offsets

On Jul 8, 12:23 am, Nicolas Lalevée nicolas.lale...@hibnet.org
wrote:

I had some issue with a prefix query. It has been fixed with my patch:https://github.com/elasticsearch/elasticsearch/pull/1065

Probably some patch will be needed for the fuzzy query.

Nicolas

Le 6 juil. 2011 à 01:20, rmartinez a écrit :

Hello,

The highlighting feature does not seem to work when I use Fuzzy Like
This query. I'm not sure if the way I constructed the query is correct
or not. Please point out to me what I'm missing in order for the
highlighting feature to work?

Using "query_string" the highlighting works -->https://gist.github.com/1065424

Using "flt" the highlighting is not working -->https://gist.github.com/1065403

Following are the mapping or articles and
{
"articles": {
"properties": {
"tags": {
"index": "not_analyzed",
"type": "string"
},
"id": {
"type": "string"
},
"content": {
"store": "yes",
"type": "string"
},
"dtmPosted": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"title": {
"store": "yes",
"type": "string"
},
"classId": {
"type": "string"
},
"postedBy": {
"index": "not_analyzed",
"type": "string"
},
"url": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
}
}

{
"adverts": {
"properties": {
"id": {
"type": "string"
},
"content": {
"store": "yes",
"type": "string"
},
"dtmPosted": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"title": {
"store": "yes",
"type": "string"
},
"price": {
"store": "yes",
"null_value": 0,
"type": "double"
},
"keywords": {
"index_name": "keyword",
"type": "string"
},
"classId": {
"type": "string"
},
"postedBy": {
"index": "not_analyzed",
"type": "string"
},
"categories": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"currency": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
}
}

THank you

Raul


(system) #4