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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:23:24+00:00 2026-06-15T15:23:24+00:00

I am trying to do a query against an index using the snowball analyzer.

  • 0

I am trying to do a query against an index using the snowball analyzer. It appears to not be working correctly. If I type in “starbucks” it will return 0 results however if I type in “starbuck” it returns all data with “Starbucks” in the name.

I know that when doing a normal search you must explicitly specify the field in order for a search_analyzer to be utilized.

Is it strange that _mapping says I am using the snowball index_analyzer but doesn’t mention the snowball search_analyzer?

Mapping Snippet:

name: {
            type: "string",
            search_analyzer : "snowball", 
            index_analyzer : "snowball",
            boost : 1
      },
tags: {
            type: "string",
            search_analyzer : "snowball", 
            index_analyzer : "snowball",
            boost : 4
      }

Snippet from /businesses/business/_mapping

name: {type: "string",analyzer: "snowball"},
tags: {type: "string",boost: 4,analyzer: "snowball"}

Java Code to do my search:

val response = client.prepareSearch("businesses")
        .setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
        .setQuery(termQuery("name", term))
        .setFrom(0).setSize(100).setExplain(true)
        .execute()
        .actionGet();
  • 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-15T15:23:25+00:00Added an answer on June 15, 2026 at 3:23 pm

    The term specified in termQuery is not analyzed and used as is. Since the word Starbucks i s indexed as term starbuck you are able to get some results back. When you are searching for the term Starbucks there is no such term in the index and you are not getting any results. I would recommend using text query instead, which will perform analysis of your term.

    val response = client.prepareSearch("businesses")
        .setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
        .setQuery(text("name", term))
        .setFrom(0).setSize(100).setExplain(true)
        .execute()
        .actionGet();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a match against query and it is not working.
Trying to get searching working on Heroku using partial search The following query generates
I am trying to query some tables in my database using a simple dropdown
I'm trying to query a MySQL database using an array but I'm having trouble!
I am trying to query the windows desktop search API using SQL. I have
I'm trying to query a database view that's not located on the same server
I am trying to write a LINQ query against two objects ( SPListItemCollection and
I am trying to query against a partitioned table (by month) approaching 20M rows.
I am trying to add a fulltext index against a table, but it does
I am trying to execute a query against oracle with the where clause including

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.