-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Chris,
On 7/24/18 1:40 PM, Chris Hostetter wrote: > > : So if I want to alias the "first_name" field to "first" and the : > "last_name" field to "last", then I would ... do what, exactly? > > se the last example here... > > https://lucene.apache.org/solr/guide/7_4/the-extended-dismax-query-par ser.html#examples-of-edismax-queries > > defType=edismax q=sysadmin name:Mike qf=title text last_name > first_name Aside: I'm curious about the use of "qf", here. Since I didn't want my users to have to specify any particular field to search, I created an "all" field and dumped everything into it. It seems like it would be better to change that so that I don't have an "all" field at all and instead I mention all of the fields I would normally have packed into the "all" field in the "qf" parameter. That would reduce my index size and also help with another question I had today (subject: Possible to define a field so that substring-search is always used?). Does that sound like a better approach than packing-together an "all" field during indexing? > f.name.qf=last_name first_name > > the "f.name.qf" has created an "alias" so that when the "q" > contains "name:Mike" it searches for "Mike" in both the last_name > and first_name fields. if it were "f.name.qf=last_name > first_name^2" then there would be a boost on matches in the > first_name field. > > For your usecase you want something like... > > defType=edismax q=sysadmin first:Mike last:Smith qf=title text > last_name first_name f.first.qf=first_name f.last.qf=last_name > > : I'm using SolrJ as the client. > > ...the examples above all show the request params, so "f.last.qf" > is a param name, "last_name" is the corrisponding param value. Awesome. I didn't realize that "f.alias.qf" was the name of the actual parameter to send. I was staring at the Solr Dashboard's selection of edismax parameters and not seeing anything that seemed correct. That's because it's a new parameter! Makes sense, now. Thanks a bunch, - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltXb9IACgkQHPApP6U8 pFifZxAAgQGXwsMzSQf9shJYmjgLgFWTYxQQBRJDFRgtEz0wtYkRS0nEoE+kO0xs BEGC6iXfXChAkOQ3Bv/QittRCxCQvXL+aoZA5ewcyumf0XhmU0My4R7AJOoIRGpO C9oPfUf8bwqynrTN0cXBIN8pr+KAG4rimAEMLxuscVeQAm3McrNbmmX22LL9VNRv /QBDnil8rPCYiprQn7SnN88IkU9irgwN/1QQ+YaUhwOMubPwygfxGTdkTJivi0KA fi5nmYE8A+wOzAGlP8GrMUZpkIfVx8VV96fwKdCyw+fi8MXVF+6rd+Z0u4TOI6Yq ZQ3d/GK7W5OImWpQOJUX9oHRmoKiUgE/27XRb6QSC/WwF1WOonClmHggSKkh24a8 dGa+5A6tbPdCxJwv9T2NPn7XBqOyvNfxzMUnItpIdNoM0lrHCOMmANoU6nnSjrPg iInAM9oG2p41zO8S83tv7KLVbOwS1xogmeUn5fr/5XQ5Z7g7V5yBE5oYgVTiUleB Sd+wjoCWeZIfLSJJfRYFLLjQmFqQOh2Fc6XCoyBYQeGLrlCiNLRHIS6dEisHFNq8 PLbXNuMyZOkrvLNFUWwYhC9pwQ8Q8z3C0i1uVSYlOVDd1GHVwJowVI9XCFbAGFoO 0ZXSy3TuHMgk8VGUZNNO0H9nHf3i8MAoMo4TDsgROs2Y9TXRVPM= =AEkI -----END PGP SIGNATURE-----