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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:21:05+00:00 2026-05-23T07:21:05+00:00

I have news-article content which is being indexes using Lucene and interrogated using Zend_Lucene

  • 0

I have news-article content which is being indexes using Lucene and interrogated using Zend_Lucene in PHP.

The content frequently makes reference to UK television channels (e.g. BBC One) but I know that our users will often enter a search term of “BBC 1” or “BBC1” rather than “BBC One”.

Is there any “standard” approach to dealing with this numbers-as-words vs. numbers-as-numerals search issue?

My choices seem to be to either amend the search term whenever I see numbers so, for example, I change a search terms of “BBC1” to “BBC 1 One” (or something similar) – or I amend the indexed content so that numerals are converted to words and vice-versa and both versions stored in the index.

  • 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-23T07:21:06+00:00Added an answer on May 23, 2026 at 7:21 am

    Please see this lucene FAQ entry, it suggests to use a token filter to provide alias / aliasing of words:

    26. How can I make ‘pig’ also match ‘hog’ ?:

    As far as I know, Lucene does not provide a tokenzier that support term aliasing but you should be able to write one yourself. All you need is to write a TokenFilter that accepts a word pair mapping and uses it map the first word to the second.

    Again, make sure to use the same analyzer both during the indexing and searching and don’t forget to submit your code to the Lucene project so other can use it as well 😉

    That’s older information probably this is even more comfortable nowadays, but probably worth the direction.

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

Sidebar

Related Questions

i have a website which contains many news articles. IN the database, each article
I have a basic CMS for some news articles, basically some of my content
I have a few models: 'Article, Video, BlogPost, News, Commodity'. Each are in their
I have two tables, news and news_views. Every time an article is viewed, the
I have created a form for my news articles which I then call to
I have my site as localhost/tutorials/rewrite/news.php on this page are titles from news articles
i have an associative array in PHP. $myarray = array( a=>News, b=>Articles, c=>images );
I have application with 2 groups of models - content based (news, questions) and
I have XML that looks like this <xml> <news> <newsitem> <publishdate>2011-10-11</publishdate> <title>Article 1</title> <breakingnewsflag>false</breakingnewsflag>
Say I have at database table containing information about a news article in each

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.