Hi
I am very newbie on ElasticSearch and I have a basic problem, I have a the
follow instructions
curl -XGET localhost:9200/twitter/script/_search?pretty=true -d '
{
"from": 0,
"size": 80,
"sort": {
"_score": "desc"
},
"facets": {
"category": {
"terms": {
"field": "category_description_untouched"
}
},
"postal_code": {
"terms": {
"field": "postal_code_untouched"
}
},
"county": {
"terms": {
"field": "county_untouched"
}
},
"listing_type": {
"terms": {
"field": "listing_type_untouched"
}
},
"address_type": {
"terms": {
"field": "address_type_untouched"
}
}
},
"query": {
"filtered": {
"query": {
"query_string": {
"query": "taxi",
"default_field": "name",
"default_operator": "and"
}
},
"filter": {
"and": {
"filters": [
{
"or": {
"filters": [
{
"geo_distance": {
"distance": "20km",
"position": "52.630885,
1.297355"
}
},
{
"fquery": {
"query": {
"text": {
"national_listing": {
"query": "true"
}
}
}
}
}
]
}
},
{
"fquery": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "700",
"default_field":
"listings.listing_categories.category_code",
"default_operator": "and"
}
}
}
}
}
},
{
"fquery": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "gb",
"default_field":
"listings.country_id",
"default_operator": "and"
}
}
}
}
}
},
{
"terms": {
"listing_language": [
"es-ES",
"es",
"en"
]
}
},
{
"not": {
"filter": {
"and": {
"filters": [
{
"term": {
"address_1": ""
}
},
{
"term": {
"address_2": ""
}
}
]
}
}
}
},
{
"not": {
"filter": {
"and": {
"filters": [
{
"missing": {
"field": "address_1"
}
},
{
"missing": {
"field": "address_2"
}
}
]
}
}
}
},
{
"not": {
"filter": {
"terms": {
"listing_privacy": [
"x",
"dqr",
"q"
]
}
}
}
}
]
}
}
}
},
"fields": [
"_source"
],
"script_fields": {
"distance": {
"script": "doc['position'].arcDistanceInKm(lat,lon)",
"params": {
"lat": 52.630885,
"lon": 1.297355
}
}
}
}'
and all results that hits returns with score value 1, I need the results
returns with differents score values. I read elastic documentation and
found that I can use custom_filters_score with boost fields
http://www.elasticsearch.org/guide/reference/query-dsl/custom-filters-score-query.html
but I can't implement that in my query. I appreciate if anyone can help
with that, and my other question is if there are other ways for doing the
query calculates score values.
Thanks
--