Difference between more like this and more like this field query


(Suman Gurung) #1

The query DSL has a couple of queries with its field version, i.e.,

  1. fuzzy like this query and fuzzy like this field query
  2. more like this query and more like this field query

I am interested to know the differences between the two versions. Apart
from the payload, are there any differences in how elasticsearch executes
the query?

Instead of using a field version of the query, can I just use the regular
query api even for single field, like the following? Is the single field
version just syntactic sugar?

{
"query" : {
"more_like_this": {
"fields": ["title"],
"like_text": "foo bar"
}
}
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/81cceb0f-bad5-4caf-9c23-1d7f98a148d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Binh Ly) #2

You are correct - they both execute the same way (field vs non-field
version). The only difference is a little syntactic convenience of single
field vs multiple fields. As for single field, you can use either method.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7d3a3662-6754-47e7-a63d-eaafd38fa0a9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3