DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • Web Development Checklist
  • Transactional Outbox Patterns Step by Step With Spring and Kotlin
  • What to Pay Attention to as Automation Upends the Developer Experience
  • Using OpenAI Embeddings Search With SingleStoreDB

Trending

  • Web Development Checklist
  • Transactional Outbox Patterns Step by Step With Spring and Kotlin
  • What to Pay Attention to as Automation Upends the Developer Experience
  • Using OpenAI Embeddings Search With SingleStoreDB
  1. DZone
  2. Data Engineering
  3. Databases
  4. Solr Presentation Assets, and a Note on DisMax Searching

Solr Presentation Assets, and a Note on DisMax Searching

Raymond Camden user avatar by
Raymond Camden
·
Nov. 21, 13 · Interview
Like (0)
Save
Tweet
Share
6.94K Views

Join the DZone community and get the full member experience.

Join For Free

Attached to this blog entry is the zip of my slides and demos from my Solr presentation at the CF Summit.

During my preparation for this presentation, I did some research into DisMax type searching. This is a Solr search type that you can use by simply adding it to your cfsearch tag.

>cfsearch collection="myblog" criteria="#form.search#" name="results" 
	status="searchStatus" suggestions="always" 
	type="dismax" 
&lgt;

Why would you use it versus the standard type? From the Wiki

Simply put, it's your choice for all user generated queries.

Out of the box, Solr uses the standard Solr query parser which is pretty stupid, understanding only syntactically correct boolean queries like "title:foo OR body:foo", it can only search one field by default, and it may very well throw an exception in your face if you put in some characters it does not like.

Therefore a new, more robust query mode was needed and the DisMax and ExtendedDisMax Query Parsers were born. They are designed to process simple user entered phrases (without heavy syntax) and search for the individual words across several fields using different weighting (boosts) based on the significance of each field, and it should never throw an exception.

All in all, it sounds like there is no reason you shouldn't switch to using it. However, when I first tested it, it seemed broken. I even filed a bug report on it. But during my presentation, I discovered I had screwed up my code and the feature works perfectly fine.

As a simple example, consider a search for "phonegap coldfusion" on this blog. By default, the standard search treats this as "OR" and returns over 2000 results. With DismMax it treats it as AND and you get far fewer, but probably much more relevant, results.

I'm going to update my own blog engine when I get back next week and I'm sure there are reasons why you wouldn't always use DisMax, but to me, it seems pretty clear that you probably want to test it out.

Download attached file


Database Blog Parser (programming language) Testing Clear (Unix) IT CFS (file format)

Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Web Development Checklist
  • Transactional Outbox Patterns Step by Step With Spring and Kotlin
  • What to Pay Attention to as Automation Upends the Developer Experience
  • Using OpenAI Embeddings Search With SingleStoreDB

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: