Hi David

It is not a stopword issue, I just used the alphabets to simplify my
question on this forum. Do you think that the term/terms filter would match
the document?

Here is the query I am making. A lot of documents have relevancy_tags
as Psychiatry but none of them match when I use the explain API.

{
    "fields": [],
    "explain": true,
    "query": {
        "custom_filters_score": {
            "query": {
                "bool": {
                    "must": [
                        {
                            "term": {
                                "show_in_work_queue": {
                                    "term": true
                                }
                            }
                        }
                    ]
                }
            },
            "filters": [
                {
                    "filter": {
                        "term": {
                            "verified_answers_count": {
                                "term": 0
                            }
                        }
                    },
                    "boost": 256
                },
                {
                    "filter": {
                        "term": {
                            "waiting_for_second_opinion": {
                                "term": true
                            }
                        }
                    },
                    "boost": 128
                },
                {
                    "filter": {
                        "term": {
                            "relevancy_tags": {
                                "term": "Psychiatry"
                            }
                        }
                    },
                    "boost": 256
                },
                {
                    "filter": {
                        "terms": {
                            "relevancy_tags": [
                                "Psychiatry",
                                "Holistic Medicine",
                                "Undersea and Hyperbaric Medicine"
                            ]
                        }
                    },
                    "boost": 16
                },
                {
                    "filter": {
                        "terms": {
                            "relevancy_tags": [
                                "Child Psychiatry",
                                "Geriatric Psychiatry",
                                "ADHD and Autism",
                                "Addiction Medicine",
                                "Clinical Psychology"
                            ]
                        }
                    },
                    "boost": 4
                },
                {
                    "filter": {
                        "terms": {
                            "relevancy_tags": [
                                "Child Psychiatry",
                                "Geriatric Psychiatry",
                                "ADHD and Autism",
                                "Addiction Medicine",
                                "Clinical Psychology"
                            ]
                        }
                    },
                    "boost": 2
                }
            ],
            "score_mode": "total"
        }
    },
    "size": 30,
    "from": 0
}


On Thu, Jan 16, 2014 at 10:10 PM, David Pilato <[email protected]> wrote:

> In 0.90, we use english stopwords by default.
>
> "A" is a stopword.
>
> I guess it´s your issue.
>
> --
> David ;-)
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
>
> Le 17 janv. 2014 à 03:44, Karan Verma <[email protected]> a écrit :
>
> Hi
>
> My field relevancy_tags is index as an array of strings. A document is
> indexed with relevancy_tags = ["a", "b","c","d"]. I want to return the
> document if the query is "a". I've tried using the term and terms filter
> but they don't return any results.
>
> Help :( ?
>
> Mapping:
>
>  "relevancy_tags" : {
>
>           "type" : "string"
>
>         },
>
>
>  --
> 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 [email protected].
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/fbb77163-246d-46b4-ba4d-25e98acdd308%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/Iw6rMaP7BW0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/0A41FF2C-E8D6-4893-B7C0-C40B55528978%40pilato.fr
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Best,
Karan

Life saving Ninja & Software Engineer

Karan pronounced Ka (http://tiny.cc/0lu61w) + Run

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGX3c4Fojmp4EK4sVVNe%2BDUvwh%2BE7KtASoF8gAca_Qnm0GW6HQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to