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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:53:26+00:00 2026-06-10T10:53:26+00:00

I have an application where I need to search in various text-based fields. The

  • 0

I have an application where I need to search in various text-based fields. The application is developed using NHibernate as an ORM.

I would like to implement Porter Stemming in searches, in order to be able to return relevant results even when the keyword matches a similar word, for example the description of a product contains memories while the search keyword is memory.

Can anyone suggest the best practices for such types of searches? The first idea that comes to mind is to store two version of the same field in database, for example:

Description
Description_Search

The Description column would be the text as entered by the website administrator, and is the text visible on the frontend.

The Description_Search would include the same text, but passed through a Porter-Stemming algorithm. Search queries would then be based on the Description_Search field, rather than Description.

Does this make sense? Is it a waste of space having to store two version of almost the same text?

Also, would Lucene.Net help in such a case? I am also looking into integrating Lucene.Net for full-text based searches but haven’t yet looked into it in detail.

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-06-10T10:53:27+00:00Added an answer on June 10, 2026 at 10:53 am

    There’s no need to use two fields for this, one would be enough. A field has two “values”, one stored that can be retrieved using Document.Get(...), and one indexed that’s used for searching. It’s not technically required to store the values either, a common solution is to store a id that’s used to lookup the original content in a database. This would also allow you to lookup more information, like author information and document location.

    Lucene.Net would help in this case, but it requires you to write the infrastructure yourself. You would need to take care of configuring analyzers (usually nothing to configure), and index your content. As mention in a comment, you could go for SQL Server’s Full Text Search functionality, but that itself has some limitations (which may not affect you).

    One big problem I’ve had using SQL Server’s FTS, but works in Lucene.Net (this isn’t really fair since you can do almost anything in Lucene.Net since you write the code that does it) is accent sensitivity. I’ve been unable to configure it using Swedish language rules, where åäö should be treated as real characters. Enabling accent sensitivity would do this, but it would also mean that diacritics is parsed as real characters, which means that ñ differs from n. (Imagine searching for a “jalapeno” and get no matches for “jalapeño”). Disabling accent sensitivity basically removes all diacritics, turning åäö into aao, and words turn out completely different.

    Writing things in Lucene.Net (compared to SQL Server FTS) allows you to provide result highlighting (present which phrases in a document that matches the query), search for similar documents, spell-checking, custom result boosting, facets, and other things that would enhance your users’ search experience.

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

Sidebar

Related Questions

I have a application already working fine. I need to implement a quick search
i have application and i need to add text programmatically to some fields it
I have java swing application with text field. I need to create JIRA like
I have this application that need to do some things in protected paths (like
I have an iPhone application and I need to implement the following method: +(UITextView
I have an application that stores data in database. I need search functionality to
I'm building the search in an application and need to have a way of
What I'd like to do is for a gaming application I need to search
Good morning, for an existing web application I need to implement time based login
I have an application in C++, but it'll need to 'talk' to Java based

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.