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

  • Home
  • SEARCH
  • 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 190935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:17:54+00:00 2026-05-11T16:17:54+00:00

I use Lucene.net to index content and documents etc.. on our CMS. This has

  • 0

I use Lucene.net to index content and documents etc.. on our CMS. This has worked well so far, but now I’ve got to take account of the following additions to web pages:

  1. Publish date
  2. Expiry date
  3. Page ‘is active’
  4. User authorisation

So the search results should only show pages that are within the Publish / Expiry window, are ‘active’ and that the current user is authorised to view.

Should I include the above information in the Lucene index? It will make the queries a little more complicated, but the hits collection will only return ‘valid’ documents which will make paging the results a lot easier.

On the other hand, I’ll be repeating information that is already in the CMS database so I’ll be risking the integrity of my data, and I’ll have update the index whenever anything in the above list is changed as well as the actual content itself.

Anyone else had this problem? How did you solve it? Thanks.

Edit: I may need to use a ‘FieldCache’ (mentioned here) to pass the ‘valid’ doc ids into the lucene search?

  • 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-11T16:17:54+00:00Added an answer on May 11, 2026 at 4:17 pm

    Query the CMS database first, and build a BitSet with all the matching documents (you’ll need a FieldCache to translate between your app’s doc ID’s with Lucene’s internal doc ID’s). Then you can run your Lucene query on your index using a Filter (wrapping the BitSet).

    You keep all mutable data in your database (where it belongs), and you don’t have to worry about updating or rebuilding your index. This will run very fast as well.

    P.S. I’ve only used the Java version of Lucene, but this should work fine in Lucene.NET

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

Sidebar

Related Questions

I use Lucene.net for indexing content & documents etc.. on websites. The index is
I use Lucene.Net to index some documents. I want to show the user a
I want to use lucene.net to index records in our database. The records are
i use lucene search but lucene has a bunch of special characters to escape
I use Lucene locally to index documents. I know how to use Lucene pretty
I am currently attempting to use Lucene to search data populated in an index.
use this website a lot but first time posting. My program creates a number
I'm using Lucene.net 2.4 for the website of a client with heavy programmatic use
I want to sort my lucene(.net) search results by a date field (date1), but
My application uses Lucene.NET to index various text files. Since each text file is

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.