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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:28:37+00:00 2026-06-04T12:28:37+00:00

When I perform a search with the following Solr query I get what I

  • 0

When I perform a search with the following Solr query I get what I want: “courses” that have been tagged with the terms ‘PHP’ or ‘Programming’.

q=[* TO *]&facet=on&facet.field=facet_contenttype&fq=facet_contenttype:mediaitems_course&facet.field=facet_wmterm&fq=(facet_wmterm:PHP OR Programming)

Now, I want to also include courses that have been tagged with ‘C# .NET’. The entire string ‘C# .NET’ is one tag in the CMS I am using. I have tried the following possibilities for the facet_wmterm filter query.

&fq=(facet_wmterm:PHP OR Programming OR C# .NET) // no quotes
&fq=(facet_wmterm:PHP OR Programming OR 'C# .NET') // quotes
&fq=(facet_wmterm:PHP OR Programming OR 'C#+.NET') // quotes and replaced space for + sign
&fq=(facet_wmterm:PHP OR Programming OR C#%2b.NET) // no quotes, encoded + sign
&fq=(facet_wmterm:PHP OR Programming OR 'C#%2b.NET') // quotes, encoded + sign
&fq=(facet_wmterm:PHP OR Programming OR 'C%23+.NET') // quotes, encoded # sign
&fq=(facet_wmterm:PHP OR Programming OR C%23+.NET) // no quotes, encoded # sign
&fq=(facet_wmterm:PHP OR Programming OR 'C%23%2B.NET') // quotes, encoded # and + signs
&fq=(facet_wmterm:PHP OR Programming OR C%23%2B.NET) // no quotes, encoded # and + signs
and a lot more options....

Strangely, all the above options return ALL courses, no matter what they are tagged with and I am pretty sure I am not looking at caching, because removing the ‘C# .NET’ bit gives me the initial, correct ‘PHP or Programming’ results.

I’d LOVE to learn how to include ‘C# .NET’ in my facet query, because I am about to go slightly mad 🙂 Thanks!

  • 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-04T12:28:39+00:00Added an answer on June 4, 2026 at 12:28 pm

    Repeating the field name does have an effect.

    &fq=facet_wmterm:Test1 OR PHP 
    

    ..is giving me ALL results (= wrong) and repeating the field name like this

    &fq=facet_wmterm:Test1 OR facet_wmterm:PHP
    

    ..is giving me courses with Test1 or PHP only (= correct!). Thanks for that Ansari.

    This still didn’t help me to properly query for .NET C# courses though, because I was also incorrectly escaping special characters. In Solr you can use quotes to search literally for what is between the quotes, but you have to use double quotes instead of the single quotes I was using. http://wiki.apache.org/solr/SolrQuerySyntax

    This worked for me:

    &fq=(facet_wmterm:Test1 OR "C# .NET")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following query to perform a search in SQLite. public MatrixCursor listViewCursor(String
I want to execute a parameterized query to perform a search by user-supplied parameters.
I have an XmlDocument in the format below. If I perform the following search
I have a site that offers a keyword search. The user can perform a
I have a need to perform search and replace operations on large blocks of
I am working on an application that will perform a search against an online
I'm writing a bit of LINQ to SQL that needs to perform a search
I have an asp.net website that has been running well in IIS 6.0. I
I'm using SQLServer 2008 and if I perform the following query: SELECT * FROM
Currently if I send the following delete-by-query command to Solr, the index should be

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.