0

I'm having trouble getting the Terms filter working for for an index.

Right now I'm searching:

"term" : { "tags" : "Dining"}

EDIT: assume that the query filters are in the right place as well, just pulling this from part of a script.

Assume that the tags item is an array of different tags a document may have. What I expected to result would be a list of documents with the tag "Dining". What actually happened is a result with 0 documents.

For mappings, it looks like this:

'tags' => [
    'type' => 'string',
    'index' => 'not_analyzed',
]

Is there a certain mappings I have to have on the array to make the Term Filter match it? Something wrong with the Term filter? I'm thinking I should change it to the Terms filter vs Term. Thanks in advance!

1 Answer 1

3

I realized that since I remapped it, it has since been working with the Terms filter, not the Term filter.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.