curl -XGET "http://localhost:9200/jdbc/article/_search?pretty=true" -d
"{ """query""" : {"""match""" : {"""designation""" :
{"""query""":"""the economy rocks""","""fuzziness""":"""0.5"""} }}}"
btw, using single quotes makes the above more readable:
curl -XGET 'http://localhost:9200/jdbc/article/_search?pretty=true' -d '
{
"query" : {
"match" : {
"designation" : {
"query":"the economy rocks",
"fuzziness":"0.5"
}
}
}
}'
it returns the following results:
the economy sucks
the economy rocks
the business
the 3rd element is returned because "the" is found in the search
string "the economy rocks". What I want is to tell elascticsearch to
ignore words smaller than 3 characters so that my query would only
return :
the economy sucks
the economy rocks
The problem here is not small words, but the fact that your query is
looking for "the OR economy OR sucks"
You could change that by setting the "operator" to "and", in which case
it will require all of the words.
Or you could set "minimum_should_match" to (eg) "70%" in which case it'd
require at least two of the three words in the query.
Also, words like 'the' are usually considered irrelevant to the query,
and are removed with the stopwords token filter by default. You have
obviously used a different analyzer from the default "standard"
analyzer, otherwise 'the' would have been removed.
clint
--
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.