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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:45:18+00:00 2026-06-16T00:45:18+00:00

How to search multiple value against multiple field in solr ? My scenario :

  • 0

How to search multiple value against multiple field in solr ?

My scenario :

Currently in schema.xml, i am using <solrQueryParser defaultOperator="AND"/> and

<copyField source="COL1" dest="defaultsearch"/>
<copyField source="COL2" dest="defaultsearch"/>

and

<fieldType name="text_search" class="solr.TextField" positionIncrementGap="100">
 <analyzer>
   <tokenizer class="solr.WhitespaceTokenizerFactory" />
   <filter class="solr.LowerCaseFilterFactory" />      
 </analyzer>
</fieldType>

and

<defaultSearchField>defaultsearch</defaultSearchField>

Example:

My search query is like q=Good Boy.

I have to fetch the records like both Good and Boy should present in either COL1 or COL2.

But for me it gives the result as expected with additional results like Good present in COL1 and Boy present in COL2 or Good present in COL2 and Boy present in COL1.

Please suggest me how to find the results with both Good and Boy should present in either COL1 or COL2.

  • 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-16T00:45:19+00:00Added an answer on June 16, 2026 at 12:45 am

    if you require exact match on COL1 and COL2, then you can execute the following (assuming COL1 and COL2 are strings) :-

    q=(COL1:"Good Boy" OR COL2:"Good Boy")
    

    If you do not require exact match and the phrase should contain both “Good” and “Boy” in any order, then try the following (untested) :-

    q=(COL1:*Good Boy* OR COL2: *Good Boy*) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do a priority order by on a multiple-value field using solr
I'm trying to search multiple fields (zc_city, zc_zip and zc_state), matching against a single
Is it possible to search the registry in multiple places for a value? I
using ie8, jqgrid 4.3.3, jquery 1.7.2 or 1.5.2, multiple search seems to miss some
I can search multiple value with mysql. I need to implement SORT BY on
I am currently trying to create a search based on multiple dropdowns. The snippet
I want to filter and search through Json using multiple keywords. I have it
I am working on a google Map Api using fusion. I have multiple search
I have a file and searching mutiple value i.e I need to search {Name,Class}
I'm trying to make a search feature that will search multiple columns to find

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.