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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:20:37+00:00 2026-05-18T04:20:37+00:00

I am using Zend Lucene to build a search feature for my website. All

  • 0

I am using Zend Lucene to build a search feature for my website. All well and good.

Understanding that Lucene does searches lexicographically (e.g.
1,
110,
1111444,
2,
3,
4,
499238492834798,
5,
etc)

I have padded my numbers to 3 digits (ranging from 010 to 990).

When I do a range search for values 110 to 160 (e.g. fieldname:[110 TO 160])it is returning results for 040! Logically this is wrong as all the numbers would start with a 1 (although it would still search for 11, 12, 13, 14, 15 and 16) so it should not match this result!

Why is this happening, and how do I stop it from doing so?

[edit]
I misread the Zend Documentation. The Range Query that sorts results lexicographically. But my problem persists.

  • 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-18T04:20:37+00:00Added an answer on May 18, 2026 at 4:20 am

    I am unable to find out why this is acting like this, so I’m doing a loop:

    for ($i = 0; $i < 50; $i + 10)
    {
     $queryString .= 'fieldname:' . ($term + $i) . ' ';
    }
    

    creates a query such as:

    fieldname:110 fieldname:120 fieldname:130 fieldname:140 fieldname:150 fieldname:160
    

    which does return the results I want exactly.

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

Sidebar

Related Questions

I've built a search index using the PHP Zend Framework Search (based on Lucene).
I am using Zend Search Lucene and if the user types in Vibrant Bouquet
I am coding search engine using Zend Framework Lucene. I'm trying to make fuzzy
Using Zend Lucene I cannot search numbers in description fields Added it like this:
I'm using Zend Lucene, but don't think the question is specific to that library.
I am using Zend Search Lucene to index a number of DOCX files. $index
I've been using Zend and need a search. The Zend docs aren't great so
I'm using Zend Lucene and wondering if it is possible to combine a range
How would I index a price int field in a Zend Lucene Search Index?
I've never came across an app/class like Zend Search Lucene before, as I've always

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.