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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:42:57+00:00 2026-06-08T11:42:57+00:00

I am pretty new to elasticsearch and just need some clarification: Can we define

  • 0

I am pretty new to elasticsearch and just need some clarification:
Can we define a analyzer while querying the search server. I tried it with the “text” and “field” query and it works fine:

Query:

curl -XPOST http://localhost:9200/test/user/_search? -d '{ "query" : {
"text" : {"_all" : {"query" :"Vaibhav","analyzer" :
"lowercase_keyword" }} } }'

Result:

{"took":144,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.10848885,"hits":{"_index":"test","_type":"user","_id":"1","_score":0.10848885,
"_source" : {
   "first_name": "Vaibhav",
   "last_name":"saini",
   "password":"pwd"

But when I try to do the same thing with term/prefix/wildcard query I get the exception:

Query:

curl -XPOST http://localhost:9200/test/user/_search? -d '{
"query" : { "term" : {"_all" : {"query" :"Vaibhav","analyzer" :
"lowercase_keyword" }} } }'

Result:

{"error":"SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures
{[kws9J6tbQtWCMNKBm3Gpkw][test][4]: SearchParseException[[test][4]:
from[-1],size[-1]: Parse Failure [Failed to parse source
[\n{\n\"query\" : {\n\"term\" : {\"_all\" : {\"query\"
:\"Vaibhav\",\"analyzer\" : \"lowercase_keyword\" }}\n}\n}]]]; nested:
QueryParsingException[[test] [term] query does not support [query]];
}{[kws9J6tbQtWCMNKBm3Gpkw][test][1]: SearchParseException[[test][1]:
from[-1],size[-1]: Parse Failure [Failed to parse source
[\n{\n\"query\" : {\n\"term\" : {\"_all\" : {\"query\"
:\"Vaibhav\",\"analyzer\" : \"lowercase_keyword\" }}\n}\n}]]]; nested:
QueryParsingException[[test] [term] query does not support [query]];
}{[kws9J6tbQtWCMNKBm3Gpkw][test][2]: SearchParseException[[test][2]:
from[-1],size[-1]: Parse Failure [Failed to parse source
[\n{\n\"query\" : {\n\"term\" : {\"_all\" : {\"query\"
:\"Vaibhav\",\"analyzer\" : \"lowercase_keyword\" }}\n}\n}]]]; nested:
QueryParsingException[[test] [term] query does not support [query]];
}]","status":500}

So is it like we can’t define analayzers while querying the elasticsearch server for some type of queries and for others we can? If not, am I doing anything wrong?

Any help is greatly appreciated.

  • 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-08T11:43:00+00:00Added an answer on June 8, 2026 at 11:43 am

    The term, prefix, and wildcard queries expect the value specified in the query to be already analyzed.

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

Sidebar

Related Questions

I am pretty new to PHP and MySQL and I just can't figure this
I pretty new to Objective-C (and C itself) and need to consume a NSData
I am pretty new to ajax,jquery and javascript. So need help. I have a
I am pretty new to Wordpress . I want to know how to define
Im pretty new to jQuery (since a week) and don't understand why I can't
Im pretty new to CI so bear with me here. I have just setup
Im pretty new to Linux in general. Ive just been following this tutorial(http://net.tutsplus.com/tutorials/php/how-to-setup-a-dedicated-web-server-for-free/) to
Am pretty new to ROR. Need help in Rails form validation. Am using rails
I'm pretty new to Android, I do know some Java though. I want to
I'm pretty new to Design Patterns.I just came across Factory Design Pattern. I understood

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.