Johnny, If you are indexing a catalog of songs and artists you can write a query parser or search component that recognizes known things like song ("you must have "bohemian rhapsody" in your catalog) or artist names (you must have the exact string "queen" in your catalog) or even their combinations and rewrites the query to be more structured and precise than what you are currently getting.
Otis ---- Performance Monitoring SaaS for Solr - http://sematext.com/spm/solr-performance-monitoring/index.html ----- Original Message ----- > From: Johnny Marnell <johnnymarn...@gmail.com> > To: solr-user@lucene.apache.org > Cc: > Sent: Sunday, January 15, 2012 1:19 AM > Subject: best query for one-box search string over multiple types & fields? > > hi all, > > short of it: i want "queen bohemian rhapsody" to return that song > named > "Bohemian Rhapsody" by the artist named "Queen", rather than > songs with > titles like "Bohemian Rhapsody (Queen Cover)". > > i'm indexing a catalog of music with these types of docs and their fields: > > artist (artistName), album (albumName, artistName), and song (songName, > albumName, artistName). > > the client is one search box, and i'm having trouble handling searching > over multiple multifields and weighting their exactness. when a user types > "queen", i want the artist Queen to be the first hit, and then albums > & > songs titled "queen". > > if "queen bohemian rhapsody" is searched, i want to return that song, > but > instead i'm getting songs like "Bohemian Rhapsody (Queen Cover)" > by "Stupid > Queen Tribute Band" because all three terms are in the songName, i'm > guessing. what kind of query do i need? > > i'm indexing all of these fields as multi-fields with ngram, shingle (i > think this might be really useful for my use case?), keyword, and standard. > that appears to be working, but i'm not sure how to combine all of this > together over multiple multi-fields. > > if anyone has good links to broadly summarized use cases of Indexing and > Querying, that would be great - i would think this would be a common > situation but i can't find any good resources on the web. and i'm > having > trouble understanding scoring and boosting. > > this was my first post, hope i did it right, thanks so much! > > -j >