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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:11:45+00:00 2026-05-27T16:11:45+00:00

In MySQL I can do something like: SELECT id FROM table WHERE field =

  • 0

In MySQL I can do something like:

  SELECT id FROM table WHERE field = 'foo' LIMIT 5

If the table has 10,000 rows, then this query is way way faster than if I left out the LIMIT part.

In ElasticSearch, I’ve got the following:

 {
    "query":{
       "fuzzy_like_this_field":{
          "body":{
             "like_text":"REALLY LONG (snip) TEXT HERE",
             "max_query_terms":1,
             "min_similarity":0.95,
             "ignore_tf":true
          }
       }
    }
 }

When I run this search, it takes a few seconds, whereas mysql can return results for the same query in far, far less time.

If I pass in the size parameter (set to 1), it successfully only returns 1 result, but the query itself isn’t any faster than if I had set the size to unlimited and returned all the results. I suspect the query is being run in its entirety and only 1 result is being returned after the query is done processing. This means the “size” attribute is useless for my purposes.

Is there any way to have my search stop searching as soon as it finds a single record that matches the fuzzy search, rather than processing every record in the index before returning a response? Am I misunderstanding something more fundamental about this?

Thanks in advance.

  • 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-05-27T16:11:45+00:00Added an answer on May 27, 2026 at 4:11 pm

    You are correct the query is being ran entirely. Queries by default return data sorted by score, so your query is going to score each document. The docs state that the fuzzy query isn’t going to scale well, so might want to consider other queries.

    A limit filter might give you similar behavior to what your looking for.

    A limit filter limits the number of documents (per shard) to execute
    on

    To replicate mysql field='foo' try using a term filter. You should use filters when you don’t care about scoring, they are faster and cache-able.

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

Sidebar

Related Questions

Using MySQL , I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id
I would like to ask something about query using mysql I have this table
I have a mysql table that looks something like this: Row 1: 'visitor_input_id' =>
The set-up A mysql table called mytable has a VARCHAR field data. The field
Given this table : mysql> describe activity; +---------------------------+-------------+------+-----+---------+-------+ | Field | Type | Null
So I have a database that has a structure something like this: [user_table] user_id,
I have a table in my MySQL database called Sponsors . This table has
In MySQL you can use the syntax DELETE t1,t2 FROM table1 AS t1 INNER
I have a date field in the database table of this format 2012-02-1.i need
$datos = mysql_query(SELECT * FROM usuarios LIMIT 0, 30 ); Who is a simple

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.