Fuzzy Search return Error while using Highlight tag

Hi All,
I am searching by using fuzzy query. If i use "highlight" it
will return error but without "highlight" tag it's working fine. I
here mentioned the queries and results.

  1. curl -XGET 'http://localhost:9200/testdatabase/datatable/_search' -
    d '{ "sort" : [ {"_score" : {"reverse" :true } } ],"query" :
    {"fuzzy" : { "myfield": "test" } }, "from" : 0, "size" :
    20,"highlight" : { "tags_schema" : "styled" ,"pre_tags" :
    [ "" ] ,"post_tags" : [ "" ],"fields": { "myfield" :
    {"number_of_fragments" : 0 },"myfield2" : {"number_of_fragments" :
    0 } } }, "explain" : false,"fields" : ["myfield","myfield2" ] }'

Result:
UnsupportedOperationException[FuzzyQuery cannot change rewrite
method]"},{"reason":"UnsupportedOperationException[FuzzyQuery cannot
change rewrite method]"}]},"hits":{"total":39,"max_score":null,"hits":
[]}}

  1. curl -XGET 'http://localhost:9200/testdatabase/datatable/_search' -
    d '{ "sort" : [ {"_score" : {"reverse" :true } } ],"query" :
    {"fuzzy" : { "myfield": "test" } }, "from" : 0, "size" : 20},
    "explain" : false,"fields" : ["myfield","myfield2" ] }'

For this query it's working fine it returns the result well..

Help me to move forward....

Can you open an issue for this? If you can do it with a fresh curl recreation, it would be great!.
On Saturday, February 12, 2011 at 6:57 AM, Arulkumar wrote:

Hi All,
I am searching by using fuzzy query. If i use "highlight" it
will return error but without "highlight" tag it's working fine. I
here mentioned the queries and results.

  1. curl -XGET 'http://localhost:9200/testdatabase/datatable/_search' -
    d '{ "sort" : [ {"_score" : {"reverse" :true } } ],"query" :
    {"fuzzy" : { "myfield": "test" } }, "from" : 0, "size" :
    20,"highlight" : { "tags_schema" : "styled" ,"pre_tags" :
    [ "" ] ,"post_tags" : [ "" ],"fields": { "myfield" :
    {"number_of_fragments" : 0 },"myfield2" : {"number_of_fragments" :
    0 } } }, "explain" : false,"fields" : ["myfield","myfield2" ] }'

Result:
UnsupportedOperationException[FuzzyQuery cannot change rewrite
method]"},{"reason":"UnsupportedOperationException[FuzzyQuery cannot
change rewrite method]"}]},"hits":{"total":39,"max_score":null,"hits":
}}

  1. curl -XGET 'http://localhost:9200/testdatabase/datatable/_search' -
    d '{ "sort" : [ {"_score" : {"reverse" :true } } ],"query" :
    {"fuzzy" : { "myfield": "test" } }, "from" : 0, "size" : 20},
    "explain" : false,"fields" : ["myfield","myfield2" ] }'

For this query it's working fine it returns the result well..

Help me to move forward....