0.90.0.RC1 Suggest Feature. How to use it? Throws exception on query

Im trying to use a suggest feature with 0.90.0.RC1 build. According to this issue https://github.com/elasticsearch/elasticsearch/issues/2774 and this documentation ( http://www.elasticsearch.org/guide/reference/api/search/suggest.html its not mention new suggest endpoint..) im trying to execute simple fuzzy
request.
Here requests that i tried, and none of them worked :frowning: :
to _search

{"suggest" : {
"my-suggest-1" : {
"text" : "the amsterdma meetpu",
"fuzzy" : {
"field" : "product_description_auto"
}
}
}
}
Result:
Got an exception:
ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]; }
Full result

  1. "error": "SearchPhaseExecutionException[Failed to execute phase
    [query], total failure; shardFailures
    {[nPlpoMIaQt-Kw8s1WRpvXw][haystack][1]: SearchParseException[[haystack][1]:
    from[-1],size[-1]: Parse Failure [Failed to parse source [{"suggest" :
    {\n "my-suggest-1" : {\n "text" : "the amsterdma meetpu",\n "fuzzy"
    : {\n "field" : "product_description_auto"\n }\n }\n } \n} ]]]; nested:
    ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported];
    }{[nPlpoMIaQt-Kw8s1WRpvXw][haystack][0]:
    SearchParseException[[haystack][0]: from[-1],size[-1]: Parse Failure
    [Failed to parse source [{"suggest" : {\n "my-suggest-1" : {\n "text"
    : "the amsterdma meetpu",\n "fuzzy" : {\n "field" :
    "product_description_auto"\n }\n }\n } \n} ]]]; nested:
    ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]; }]"
    ,
  2. "status": 500

to _suggest:

{
"text" : "the amsterdma meetpu",
"fuzzy" : {
"field" : "product_description_auto"
}
}

Result:

ElasticSearchIllegalArgumentException[[suggest] does not support [field]]

Full result

  1. {
  2. "_shards": {
  3. "total": 5,
  4. "successful": 0,
  5. "failed": 5,
  6. "failures": [{
  7. "index": "haystack",
  8. "shard": 4,
  9. "reason": "BroadcastShardOperationFailedException[[haystack][4] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  10. }, {
  11. "index": "haystack",
  12. "shard": 0,
  13. "reason": "BroadcastShardOperationFailedException[[haystack][0] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  14. }, {
  15. "index": "haystack",
  16. "shard": 1,
  17. "reason": "BroadcastShardOperationFailedException[[haystack][1] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  18. }, {
  19. "index": "haystack",
  20. "shard": 2,
  21. "reason": "BroadcastShardOperationFailedException[[haystack][2] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  22. }, {
  23. "index": "haystack",
  24. "shard": 3,
  25. "reason": "BroadcastShardOperationFailedException[[haystack][3] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  26. }]
  27. }
  28. }

So here even a error format differs from the _search. Is it intentionally
or its a bug?
Next i tried following request:
Get ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]

Which is looking exactly like exception from first query to _search. But
here its presented again as a list of 5 nodes instead of one errror.

So.. what query is right for suggest, what i missed? and what happening
with error format?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

hey, I think the documetation is out of date. I renamed 'fuzzy' to 'term'
suggester in beta1.
I will update the documentation tomorrow hopefully.

sorry for the inconvenience.

simon
On Thursday, March 21, 2013 10:10:36 PM UTC+1, Dmitry Molotkov wrote:

Im trying to use a suggest feature with 0.90.0.RC1 build. According to this issue https://github.com/elasticsearch/elasticsearch/issues/2774 and this documentation ( http://www.elasticsearch.org/guide/reference/api/search/suggest.html its not mention new suggest endpoint..) im trying to execute simple fuzzy
request.
Here requests that i tried, and none of them worked :frowning: :
to _search

{"suggest" : {
"my-suggest-1" : {
"text" : "the amsterdma meetpu",
"fuzzy" : {
"field" : "product_description_auto"
}
}
}
}
Result:
Got an exception:
ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]; }
Full result

  1. "error": "SearchPhaseExecutionException[Failed to execute phase
    [query], total failure; shardFailures
    {[nPlpoMIaQt-Kw8s1WRpvXw][haystack][1]: SearchParseException[[haystack][1]:
    from[-1],size[-1]: Parse Failure [Failed to parse source [{"suggest" :
    {\n "my-suggest-1" : {\n "text" : "the amsterdma meetpu",\n "fuzzy"
    : {\n "field" : "product_description_auto"\n }\n }\n } \n} ]]]; nested:
    ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported];
    }{[nPlpoMIaQt-Kw8s1WRpvXw][haystack][0]:
    SearchParseException[[haystack][0]: from[-1],size[-1]: Parse Failure
    [Failed to parse source [{"suggest" : {\n "my-suggest-1" : {\n "text"
    : "the amsterdma meetpu",\n "fuzzy" : {\n "field" :
    "product_description_auto"\n }\n }\n } \n} ]]]; nested:
    ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]; }]"
    ,
  2. "status": 500

to _suggest:

{
"text" : "the amsterdma meetpu",
"fuzzy" : {
"field" : "product_description_auto"
}
}

Result:

ElasticSearchIllegalArgumentException[[suggest] does not support [field]]

Full result

  1. {
  2. "_shards": {
  3. "total": 5,
  4. "successful": 0,
  5. "failed": 5,
  6. "failures": [{
  7. "index": "haystack",
  8. "shard": 4,
  9. "reason": "BroadcastShardOperationFailedException[[haystack][4] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  10. }, {
  11. "index": "haystack",
  12. "shard": 0,
  13. "reason": "BroadcastShardOperationFailedException[[haystack][0] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  14. }, {
  15. "index": "haystack",
  16. "shard": 1,
  17. "reason": "BroadcastShardOperationFailedException[[haystack][1] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  18. }, {
  19. "index": "haystack",
  20. "shard": 2,
  21. "reason": "BroadcastShardOperationFailedException[[haystack][2] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  22. }, {
  23. "index": "haystack",
  24. "shard": 3,
  25. "reason": "BroadcastShardOperationFailedException[[haystack][3] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  26. }]
  27. }
  28. }

So here even a error format differs from the _search. Is it intentionally
or its a bug?
Next i tried following request:
Get ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]

Which is looking exactly like exception from first query to _search. But
here its presented again as a list of 5 nodes instead of one errror.

So.. what query is right for suggest, what i missed? and what happening
with error format?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dmitry,

I updated the reference documentation

simon

On Thursday, March 21, 2013 11:07:56 PM UTC+1, simonw wrote:

hey, I think the documetation is out of date. I renamed 'fuzzy' to 'term'
suggester in beta1.
I will update the documentation tomorrow hopefully.

sorry for the inconvenience.

simon
On Thursday, March 21, 2013 10:10:36 PM UTC+1, Dmitry Molotkov wrote:

Im trying to use a suggest feature with 0.90.0.RC1 build. According to this issue https://github.com/elasticsearch/elasticsearch/issues/2774and this documentation ( http://www.elasticsearch.org/guide/reference/api/search/suggest.html its not mention new suggest endpoint..) im trying to execute simple fuzzy
request.
Here requests that i tried, and none of them worked :frowning: :
to _search

{"suggest" : {
"my-suggest-1" : {
"text" : "the amsterdma meetpu",
"fuzzy" : {
"field" : "product_description_auto"
}
}
}
}
Result:
Got an exception:
ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]; }
Full result

  1. "error": "SearchPhaseExecutionException[Failed to execute phase
    [query], total failure; shardFailures
    {[nPlpoMIaQt-Kw8s1WRpvXw][haystack][1]: SearchParseException[[haystack][1]:
    from[-1],size[-1]: Parse Failure [Failed to parse source [{"suggest" :
    {\n "my-suggest-1" : {\n "text" : "the amsterdma meetpu",\n "fuzzy"
    : {\n "field" : "product_description_auto"\n }\n }\n } \n} ]]]; nested:
    ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported];
    }{[nPlpoMIaQt-Kw8s1WRpvXw][haystack][0]:
    SearchParseException[[haystack][0]: from[-1],size[-1]: Parse Failure
    [Failed to parse source [{"suggest" : {\n "my-suggest-1" : {\n "text"
    : "the amsterdma meetpu",\n "fuzzy" : {\n "field" :
    "product_description_auto"\n }\n }\n } \n} ]]]; nested:
    ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]; }]"
    ,
  2. "status": 500

to _suggest:

{
"text" : "the amsterdma meetpu",
"fuzzy" : {
"field" : "product_description_auto"
}
}

Result:

ElasticSearchIllegalArgumentException[[suggest] does not support [field]]

Full result

  1. {
  2. "_shards": {
  3. "total": 5,
  4. "successful": 0,
  5. "failed": 5,
  6. "failures": [{
  7. "index": "haystack",
  8. "shard": 4,
  9. "reason": "BroadcastShardOperationFailedException[[haystack][4] ];
    nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  10. }, {
  11. "index": "haystack",
  12. "shard": 0,
  13. "reason": "BroadcastShardOperationFailedException[[haystack][0]
    ]; nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  14. }, {
  15. "index": "haystack",
  16. "shard": 1,
  17. "reason": "BroadcastShardOperationFailedException[[haystack][1]
    ]; nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  18. }, {
  19. "index": "haystack",
  20. "shard": 2,
  21. "reason": "BroadcastShardOperationFailedException[[haystack][2]
    ]; nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  22. }, {
  23. "index": "haystack",
  24. "shard": 3,
  25. "reason": "BroadcastShardOperationFailedException[[haystack][3]
    ]; nested: ElasticSearchException[failed to execute suggest]; nested:
    ElasticSearchIllegalArgumentException[[suggest] does not support [field]]; "
  26. }]
  27. }
  28. }

So here even a error format differs from the _search. Is it intentionally
or its a bug?
Next i tried following request:
Get ElasticSearchIllegalArgumentException[Suggester[fuzzy] not supported]

Which is looking exactly like exception from first query to _search. But
here its presented again as a list of 5 nodes instead of one errror.

So.. what query is right for suggest, what i missed? and what happening
with error format?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.