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

  • SEARCH
  • Home
  • 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 7918757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:36:59+00:00 2026-06-03T15:36:59+00:00

i have created my index and mapping by this JSON // 1st Mapping http://localhost:9200/hdm/entities/_mapping

  • 0

i have created my index and mapping by this JSON

// 1st Mapping
    http://localhost:9200/hdm/entities/_mapping
    {
            "entities" : {
                "properties": {
                    "name": { "type": "string", "boost": 2.0, "analyzer": "snowball" },
                    "description": { "type": "string", "analyzer": "nGram" }
                }
            }
        }
// 2nd Mapping
    http://localhost:9200/hdm/products/_mapping
    {
        "products": {
            "_parent": { "type": "entities" },
            "properties": {
                "name": { "type": "string", "boost": 2.0, "analyzer": "snowball" },
                "code": { "type": "string", "analyzer": "snowball" },
                "segment": { "type": "string", "analyzer": "snowball" },
                "description": { "type": "string", "analyzer": "snowball" }
            }
        }
    }

now i have indexed some docs in this index using the JSON

    http://localhost:9200/hdm/entities/100
    {
        "name":"Entity 001",
        "description":"this is the company or an organization which provides the whole medicine, tablets injunction for the problem of human being those noting worth gaining was ever gained without effort

",
        "itype":"entities"
    }

    http://localhost:9200/hdm/products/101?parent=100
    {
        "name":"biorich",
        "description":"the tablet para is used to rectify the person from the all types of pain in the body, kingston , car, bat, ball, description of the products",
        "code":"COD19202",  
        "segment":"SEG1022",
        "itype":"products"
    }

for search i used this JSON

{
  "query": {
    "filtered": {
      "query": {
        "bool": {
          "should": [
            {
              "has_child": {
                "type": "products",
                "query": {
                  "query_string": {
                    "query": "tab"
                  }
                }
              }
            },
            {
              "query_string": {
                "query": "tablet"
              }
            }
          ]
        }
      },
      "filter": {
        "or": [
          {
            "term": {
              "itype": "entities"
            }
          }
        ]
      }
    }
  }
}

i didn’t get the result but i changed the query string like this then i got the result

      "query_string": {
        "default_field" : "description"
        "query": "tablet"
      }

could you please confirm me, should we mention the default_field in the querystring to get nGram analyzer result? my analyzer configuration is as follows

index.analysis.analyzer.mynGram.type: custom
index.analysis.analyzer.mynGram.tokenizer: standard
index.analysis.analyzer.mynGram.filter: [lowercase, mynGramFilter]
index.analysis.filter.mynGramFilter.type: nGram
index.analysis.filter.mynGramFilter.min_gram: 1
index.analysis.filter.mynGramFilter.max_gram: 10
  • 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-03T15:37:00+00:00Added an answer on June 3, 2026 at 3:37 pm

    When "default_field" is not specified in the query, elasticsearch is using special _all field to perform the search. Since you didn’t change the default analyzer nor specified an analyzer for the _all field in your mapping, searches against the _all field are performed using standard analyzer.

    • 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 created an index on my table like this: CREATE INDEX index_typ_poplatky ON
I have an ggplot2 point chart created like this qplot(Index, Popularity ,data = data.slopeone.agg)
I have activated the IIS package for windows, and, I created an index.html file
If I have a table column with data and create an index on this
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
I have created several Q about correctly mapping a website with a database so
I have created the code to perform a mapping of points from one vector
I have already read Entity Framework One-To-One Mapping Issues and this is not duplicate
I have a JSON string that I am mapping with ko.mapping plugin and I

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.