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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:59:44+00:00 2026-05-11T11:59:44+00:00

Can I boost different fields in MultiFieldQueryParser with different factors? Also, what is the

  • 0

Can I boost different fields in MultiFieldQueryParser with different factors? Also, what is the maximum boost factor value I can assign to a field?

Thanks a ton! Ed

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T11:59:44+00:00Added an answer on May 11, 2026 at 11:59 am

    MultiFieldQueryParser has a [constructor][1] that accepts a map of boosts. You use it with something like this:

    String[] fields = new String[] { 'title', 'keywords', 'text' }; HashMap<String,Float> boosts = new HashMap<String,Float>(); boosts.put('title', 10); boosts.put('keywords', 5); MultiFieldQueryParser queryParser = new MultiFieldQueryParser(     fields,      new StandardAnalyzer(),     boosts ); 

    As for the maximum boost, I’m not sure, but you shouldn’t think about boost in absolute terms anyway. Just use a ratio of boosts that makes sense. Also see this question.

    [1]: https://lucene.apache.org/core/4_4_0/queryparser/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.html#MultiFieldQueryParser(org.apache.lucene.util.Version, java.lang.String[], org.apache.lucene.analysis.Analyzer, java.util.Map)

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

Sidebar

Ask A Question

Stats

  • Questions 93k
  • Answers 93k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The text alignment needs to be declared in CSS. You… May 11, 2026 at 6:35 pm
  • Editorial Team
    Editorial Team added an answer Open and read the following: /proc/net/tcp - a list of… May 11, 2026 at 6:35 pm
  • Editorial Team
    Editorial Team added an answer start "MY EXE" my.exe That kicks the exe off in… May 11, 2026 at 6:35 pm

Related Questions

I've been browsing revision 1.38.0 of the Boost libraries, in an attempt to decide
I was trying to figure out why a debug build was blowing up with
Currently my app uses just Direct3D9 for graphics, however in the future I' m
I'm deserializing a fair amount of data through Boost.Serialization (one for each frame). However,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.