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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:24:57+00:00 2026-06-17T18:24:57+00:00

This string is indexed: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do

  • 0

This string is indexed: “Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.”

My query is: “Hello world. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Other text.“

When I run the query I get no results. How can I get the result if my query has a little “garbage” text in it?

I am using Django, Haystack, and ElasticSearch.

  • 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-17T18:24:58+00:00Added an answer on June 17, 2026 at 6:24 pm

    If you use a “match” query with the default operator of “or”, then you’ll get hits where any of the words match, but hits where lots of the words match will rank above hits where few of the words match.

    http://www.elasticsearch.org/guide/reference/query-dsl/match-query.html

    But if you mean you only want to match that exact phrase, but allow some additional text on either end, I’m not sure you can do precisely that.

    One option, if you can relax the requirement for an exact phrase match, would be to analyse the documents (and the query) using a shingle token filter.

    http://www.elasticsearch.org/guide/reference/index-modules/analysis/shingle-tokenfilter.html

    Then a match query with “or” operator would operate on pairs, triplets, quads etc. of words (depending on filter configuration). Setting the shingle size to just 2 or 3 would make it unlikely that a document containing many of the same words as the query (by chance) would score highly.

    Or you could use a phrase query with slop (see bottom of match query page above).

    Both of these approaches would allow insertions as well as prefixes/suffixes though.

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

Sidebar

Related Questions

I want to use a datastructure like this: building string (indexed) date TDate (indexed)
Using WPF with MVVM, my VM has an indexed property IObject1 this[string key] I
Let's say I have document indexed with Apache Solr that contains this string: Klüft
I have a class with a custom indexer like so public string this[VehicleProperty property]
Given this string random_string= '4' i want to determine if its an integer, a
In this string: <0> <<1>> <2>> <3> <4> I want to match all instances
Given this string: Fri, 09 Apr 2010 14:10:50 +0000 how does one convert it
I have this string 2012-06-27 16:17:06 and I want to convert it to GMT
I have this String String criteria=ESS.(BVA4+BVA5)+(-(DIESE.(BVM5+BVM6))); I want to put validations on it. It
I have this string in php i want to skip the ppattern ------------------------------------------ FROM:Andy;

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.