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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:39:46+00:00 2026-06-09T06:39:46+00:00

I am editing a lucene .net implementation (2.3.2) at work to include stemming and

  • 0

I am editing a lucene .net implementation (2.3.2) at work to include stemming and automatic wildcarding (adding of * at the ends of words).

I have found that exact words with wildcarding don’t work. (so stack* works for stackoverflow, but stackoverflow* does not get a hit), and was wondering what causes this, and how it might be fixed.

Thanks in advance. (Also thanks for not asking why I am implementing both automatic wildcarding and stemming.)

I am about to make the query always prefix query so I don’t have to do any nasty adding “*”s to queries, so we will see if anything becomes clear then.

Edit: Only words that are stemmed do not work wildcarded. Example Silicate* doesn’t work, but silic* does.

  • 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-09T06:39:47+00:00Added an answer on June 9, 2026 at 6:39 am

    The reason it doesnt work is because you stem the content, thus changing the Term.

    For example consider the word “valve”. The snowball analyzer will stem it down to “valv”.

    So at search time, since you stem the input query, both “valve” and “valves” will be stemmed down to “valv”. A TermQuery using the stemmed Term “valv” will yield a match on both “valve” and “valves” occurences.

    But now, since in the Index you stored the Term “valv”, a query for “valve*” will not match anything. That is because the QueryParser does not run the Analyzer on Wildcard Queries.

    There is the AnalyzingQueryParser than can handle some of these cases, but I don’t think it was in 2.3.x versions of Lucene. Anyway its not a universal fit, the documentation says:

    Warning: This class should only be used with analyzers that do not use stopwords or that add tokens. Also, several stemming analyzers are inappropriate: for example, GermanAnalyzer will turn Häuser into hau, but H?user will become h?user when using this parser and thus no match would be found (i.e. using this parser will be no improvement over QueryParser in such cases).

    The solution mentionned in the duplicate I linked works for all cases, but you will get bigger indexes.

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

Sidebar

Related Questions

While editing and fixing up code I have thought that sometimes it would be
Editing my nib for a document-based Cocoa application, I see that when I have
I have an product editing page that allows you to add Related Items. When
When editing a resource in the Visual Studio resource view, I find that a
Editing the question. I have SQL like this: `table1`.`DateField` >= DATE_SUB(NOW(), INTERVAL {$days} DAY
When editing parts of my project that get called in Application_Start(), i want to
while editing the template of my blog i saw that header size is set
Background: Sometimes when editing in vim it is possible to have extra characters in
Editing some legacy code that populates a datagrid entirely in code. I need to
When editing JavaScript, I usually have to do this: function myFunc() { // func

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.