• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SOLR searching multiple dynamic field _b boolean fields at the same time

New Here ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

I am using Coldfusion 2018 cfsearch, which uses SOLR.
 

When I do a search on a dynamic boolean field like so, it works and returns correct results.

<CFSEARCH name = "GetResults" collection = "mycollection" criteria="is_ethics_b:1" >

When I try to query more than one dynamic boolean fields:

<CFSEARCH name = "GetResults" collection = "mycollection" criteria="is_ethics_b:1 is_visible_b:0" >

<CFSEARCH name = "GetResults" collection = "mycollection" criteria="is_ethics_b:1 AND is_visible_b:0"

>

<CFSEARCH name = 'GetResults' collection = 'mycollection' criteria=' ""is_ethics_b:1"" AND ""is_visible_b:0"" '>

 

I have tried other combinations but I get variations of the same error:

cannot convert the value "1 AND is_visible_b:0" to a boolean

 

What is best way to query two dynamic _b fields?

Also, is there a way to test the query directly on the SOLR server? 

 

Thank you for any help.

 

Views

198

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

I don't know if there's a way to search for two boolean values in a Solr search. You could, however, run two CFSEARCH tags then merge the results into a single query object.

 

I'm blanking on the URL for accessing Solr directly, but you should see submitted Solr queries in the Jetty log files - Jetty is the servlet engine that runs Solr as part of the "add-on services" if I recall correctly.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2021 Apr 14, 2021

Copy link to clipboard

Copied

LATEST

Thank you for your reply.  It is strange that I can't search two boolean values. 

 

I ended up changing all my boolean _b to integer _i fields. It appears to work for my purpose so I'll just stick with that.

 

Thank you again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation