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 8679485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:59:03+00:00 2026-06-12T20:59:03+00:00

I have certain document which stores the brand names in analysed form for ex:

  • 0

I have certain document which stores the brand names in analysed form for ex: {“name”:”Samsung”}
{“name”:”Motion Systems”}. There are cases where i would want a term search starting with “s” which should result in both the documents. and another case where i want only the complete field starting with “s” query which results in only “samsung” returned.
I have analysed the name field and stored it. Is there any way in which i can do the complete field starting with query in elastic search?

  • 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-12T20:59:04+00:00Added an answer on June 12, 2026 at 8:59 pm

    You should index your field in two different ways using a multi_field. If you tokenize it as you already do you have a match based on the tokens produced by the tokenizer. For the second tye of match that you want you need to either disable analyzing the field and indexing it as it is, or use the Keywork tokenizer which produce the same result. Your mapping would look like this:

    {
        "your_type" : {
            "properties" : {
                "brand" : {
                    "type" : "multi_field",
                    "fields" : {
                        "brand" : {"type" : "string", "index" : "analyzed"},
                        "untouched" : {"type" : "string", "index" : "not_analyzed"}
                    }
                }
            }
        }
    }
    

    Then you can search on both fields. When you search on brand you get the matches that you already have, while searching on brand.untouched you would get the second tye of matches.
    There are different ways to put together multiple queries, you can have a look for instance at the bool query.

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

Sidebar

Related Questions

In an XML document, I have elements which share the same name, but the
I have certain modules which handle user actions - they are Control Modules. There
Is there a method for inserting a new document which does not contain certain
We have certain configuration files which we want to be in version control as
I'm in a situation where I have a xml document which is going to
I have something similar to the following in an XML document: <variables> <variable> <name>ctrl_btn</name>
I have an XML file in which I want to extract data from certain
I have a non document-based Core Data application. There's an NSTreeController that manages a
I have certain code which copies <div> content to <textarea> , but then it
Possible Duplicates: Attribute Value Selection in SimpleXML SimpleXML: Selecting Elements Which Have A Certain

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.