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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:41:26+00:00 2026-05-20T15:41:26+00:00

I index a boolean field like this: [Field(Index.UnTokenized, Store = Store.No)] public virtual bool

  • 0

I index a boolean field like this:

[Field(Index.UnTokenized, Store = Store.No)]
public virtual bool P { get; set; }

My query code looks like this:

public IList<MappedSequence> Query(string term, out int total, int page, int pageSize)
{
    if (term.ToString().Equals("") == false)
    {
    var parser = new MultiFieldQueryParser(Lucene.Net.Util.Version.LUCENE_29, new[] { "Query" }, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29));
    Query query = parser.Parse(term);

    IFullTextSession session = Search.CreateFullTextSession(this.Session);
    IQuery fullTextQuery = session.CreateFullTextQuery(query, new[] { typeof(MappedSequence) });
    total = fullTextQuery.List<MappedSequence>().Count();
    return fullTextQuery.List<MappedSequence>().Skip((page - 1) * pageSize).Take(pageSize).ToList<MappedSequence>();
    }
    else
    {
    total = 0;
    return null;
    }
}

This works fine for other index field but not for the boolean ones. I tried all sorts for term:

"P:\"TRUE\""
"P:\"1\""

without success. Any ideas what could be wrong?

BTW is there a more efficient way to determine total?

Thanks!

Christian

  • 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-20T15:41:27+00:00Added an answer on May 20, 2026 at 3:41 pm

    It appears that if I use Tokenized for indexing it works.

    Christian

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

Sidebar

Related Questions

Could I add a boolean field to my database data called something like updated
I need to index a varchar field on my table in MS SQL Server
Given a columns' index, how can you get an Excel column name? The problem
From http://projecteuler.net/index.php?section=problems&id=99 Comparing two numbers written in index form like 2 11 and 3
I have a bunch of boolean options for things like acceptable payment types which
hello i use this code for diplay my conversation list private Cursor getMessages( SQLiteDatabase
Help me ..my page index is not working in visual studio. my page load
I have an index.php file which has to process many different file types. How
I need to index a whole lot of webpages, what good webcrawler utilities are
I have an index on columns A, B, C, D of table T I

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.