Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:06:17+00:00 2026-06-13T20:06:17+00:00

I have this mapping: products: { product: { properties: { id: { type: long

  • 0

I have this mapping:

products: {
    product: {
        properties: {
            id: {
                type: "long"
            },
            name: {
                type: "string"
            },
            tags: {
                dynamic: "true",
                properties: {
                    tagId: {
                        type: "long"
                    },
                    tagType: {
                        type: "long"
                    }
                }
            }
        }
    }
}

I want to create a facet on tag ids, but with tag-type filtering.
I need the filter to only apply on the facet and not the query results.
So here’s my request:

{
"from": 0,
"size": 10,
"facets": {
    "tags": {
        "terms": {
            "field": "tags.tagId",
            "size": 10
        },
        "facet_filter": {
            "terms": {
                "tags.tagType": [
                    "11",
                    "19"
                ]
            }
        }
    }
},
"query": {
    "match_all": {}
}

}

The facet filtering does not seem to affect the faceting.
Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:06:18+00:00Added an answer on June 13, 2026 at 8:06 pm

    The filter is applied to the documents, the parent entity in your example. That means that you’re filtering the documents on which you make the facet by tags.tagType. Therefore all documents which have a specific tags.tagType value are used to build the facet, which is not what I want.

    This is the usecase for nested documents. You can have a look at this nice article too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple document with this mapping: 'product': { 'properties': { 'name': { 'type':
I have a Hibernate mapping that looks something like this: <class name=MyEntity> <set name=scalarSet
I have a mapping like this: @ManyToMany(cascade = CascadeType.PERSIST) @JoinTable( name=product_product_catalog, joinColumns={@JoinColumn(name=product_catalog, referencedColumnName=product_catalog)}, inverseJoinColumns={@JoinColumn(name=product,
I have an Entity called Product, this entity, through table mapping, merges 6 tables
I have some entities with relationships: component name=Store persistent=true { property name=Products fieldtype=one-to-many cfc=Product;
I have this schema: Products (**ProductId**, OwnerId, Name) Categories (**CategoryId**, Name) ProductsInCategories( **ProductId**, CategoryId
[This scenario is for illustration] I have certain products, and each product can have
I have been working on getting this seat mapping chart for a while and
I am using nhibernate and i have code like this in the mapping area:
I would like to have a mapping function that does this: public static void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.