You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2018/03/12 17:20:31 UTC

Including a filtered-field in the default-field

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

I have a Solr index containing application user information (username,
first/last, etc.). I have created an "all" field for the purpose of
using it as a default. It contains most but not all fields.

I recently added phonetic searching for the first and last names
(together in a single field) but it will only work if the query
specifies that field like this:

  chris or phonetic:schultz

Is there a way to add the phonetic field to the "all" field and have
it searched phonetically alongside the non-phonetic fields/terms? I
see I cannot have multiple "default fields" :)

I know on the back-end I can construct a query like this:

  all:[query] phonetic:[query]

...but I'd prefer to do as little massaging of the query as possible.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqmtt8dHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFggzQ//SRglgqRRvh9GgwCk
A2xAjiMZSnf6iYsVJDMPlP1IhlLVrgPH5gm3tKWbOHdf52s3RPaWXHlDE3PAuHtx
gpDPOief+mo4X/XmlWnj8R461XahOAhEDKeJ6uIS4X2qR2hZvSQd+gXMN4/aoA/l
BcRNSTiQGKUVDDj+3wZayFhjElrrfaDbWC2dwnM2ULMrgK7xyhnulCVjUV+hOswY
AmMyTuDJNjPuiT867x8Cckoh8J468OkBtQUUkdHn9UiHwShD8TxaDSUVcpqyxihr
oODmvLfPN6EIkv0CN4h/pNrRCvQBlNTSeIh2AqFk7rnD4W0nWSzRXcV5seyGushI
pzPvebtIsYcxx+DU7d/4jqH42yba9fADPFa+xhHckbwY4e2lZxvKF7HpLu6aoVnH
zhCl/Cdu3cwZPmDWsUX+3Xkb7r28pe1iUrdNoYrbrhfL2WR6xJX5hL32QQyoyy8V
w/SU8XLgETYSe0oN773F/Lxjwf2AVATdKY9acrsKr+KSI5VFEFBHNJctkpk0o630
OOI1FYencsbiCdIVoRQ5b94EU/iAqs7r8wi6OdyeawyPOFDZhFwFMeYUPasuWrCP
MEB0iSbCI9OIG5pi6tiTtbOQQ85Qb41u2VcyOqKHkneEMn58/nx2QY0FiS3XvcC7
HuZC0A7VssLRu2g5+joWp4NBILI=
=yyJm
-----END PGP SIGNATURE-----

Re: Including a filtered-field in the default-field

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Erick,

On 3/12/18 2:50 PM, Erick Erickson wrote:
> Something like:
> 
> ....solr/collection/query?q=chris shultz&defType=edismax&qf=all^10
> phonetic

Interesting. Looks like the "qf=all phonetic" would take the place of
my existing "df=all" parameter.

> The point of edismax is to take whatever the input is and
> distribute it among one or more fields defined by the "qf"
> parameter. In this case, it'll look for "chris" and "shultz" in
> both the "all" and "phonetic" fields. It would boost matches in the
> "all" field by 10, giving you an easy knob to tweak for "this field
> is more important than this other one".
> 
> You can combine  "fielded" searches, something like: 
> ....solr/collection/query?q=firstName:chris 
> shultz&defType=edismax&qf=all phonetic
> 
> would search for "shultz" in the "all" and "phonetic" fields while 
> searching for "chris" only in the "firstName" field.
> 
> As you have noticed, there are a _lot_ of knobs to tweak when it
> comes to edismax, and the result of adding &debug=query to the URL
> can be...bewildering. But edismax was created exactly to spread the
> input out across multiple fields automatically.
> 
> You can also put these as defaults in your requesthandler in 
> solrconfig.xml. The "browse" handler in some of the examples will
> give you a template, I'd copy/paste from the "browse" handler to
> you main handler (usually "selsect"), as the "browse" handler is
> tied into the Velocity templating engine....
> 
> To start, since there are a lot of parameters to tweak, I'd just
> start with the "qf" field (plus some boosts perhaps). Then move on
> to pf, pf2, pf3. mm will take a while to get your head around all
> by itself. I think once you see the basic operation, then the rest
> of the parameters will be easier to understand.
> 
> And I urge you to take it a little at a time, just use two fields
> and two terms and look at the result of &debug=query, the parsed
> query bits, 'cause each new thing you add adds a further
> complication. Fortunately you can just put different parameters on
> the URL and see the results for rapidly iterating.
> 
> Best, Erick
> 
> 
> On Mon, Mar 12, 2018 at 11:30 AM, Christopher Schultz 
> <ch...@christopherschultz.net> wrote: Erick,
> 
> On 3/12/18 1:36 PM, Erick Erickson wrote:
>>>> Did you try edismax?
> 
> Err.... no, and I must admit that it's a lot to take in. Did you
> have a particular suggestion for how to use it?
> 
> Thanks, -chris
> 
>>>> On Mon, Mar 12, 2018 at 10:20 AM, Christopher Schultz 
>>>> <ch...@christopherschultz.net> wrote: All,
>>>> 
>>>> I have a Solr index containing application user information 
>>>> (username, first/last, etc.). I have created an "all" field
>>>> for the purpose of using it as a default. It contains most
>>>> but not all fields.
>>>> 
>>>> I recently added phonetic searching for the first and last
>>>> names (together in a single field) but it will only work if
>>>> the query specifies that field like this:
>>>> 
>>>> chris or phonetic:schultz
>>>> 
>>>> Is there a way to add the phonetic field to the "all" field
>>>> and have it searched phonetically alongside the non-phonetic 
>>>> fields/terms? I see I cannot have multiple "default fields"
>>>> :)
>>>> 
>>>> I know on the back-end I can construct a query like this:
>>>> 
>>>> all:[query] phonetic:[query]
>>>> 
>>>> ...but I'd prefer to do as little massaging of the query as 
>>>> possible.
>>>> 
>>>> Thanks, -chris
>>>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqm/vIdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFjWfhAAumgA99yS8li4nT+r
FLtssQ4bitBaMk3QtJQCaHULV90OHYWtL2h0JDewsve+1QP1pUU0R2d/uzHdAF5G
Nzo1bqqUCkt11NwsOC4Fe7B06ZCYTlUf7r/qWiNI2fJmRy7Wit8+6qqtMuXNpGMr
U+dgsiB9Wn6ygfuDKsMU8++MIxPT908Tu2wDarTTRQ6DvGyGucuRMf8ItYKklBIv
I4pDuuS5UY8CpZcIN8bw8Hm7rbfXskC12Lezk81QDnNimbC4u8J9uinReqpWGzC0
d2VsNDkKONBzjGaeUwvtyBLJrEXqWn9F75nSq8PYC/eOalEO8iO9pwolmbtnJ3na
VRE8TjsuapoOTYZEZcxbw39/U0gCcO4Ns5Fs3W405gA5ouQ5qnOKPHnk5hRxAEBo
QW/31n+mXsjt3S8EzRtlCwyXcVykyyafS5exzzZqgx4j8hJMw3zfHUkF8oJC5nyt
f5Tvk/8w5epe/3xKSeAf+5QTtAT5/5DftYiOvMqraTxwVuO/d4QeehAMtzUVCdm8
8JXpAbvp9HiADt52fP8YqQwMs4aX3cbA8SeDaVMZK130XM72hcg7ykspwnEejE8a
DIRbHG4I5Z6F4M9mTBudKbJhhDzkWYjo5mAjnd+1apOv1wKH1qELz7XSevVsyQb0
SI+WDftPFpdJ8bAu5XTGvs5TOpw=
=RM6r
-----END PGP SIGNATURE-----

Re: Including a filtered-field in the default-field

Posted by Erick Erickson <er...@gmail.com>.
bq:  Looks like the "qf=all phonetic" would take the place of my
existing "df=all" parameter.

In fact, it may call int question whether you even want an "all" field
or just list all the
fields you _would_ have copied into "all" in the "qf" parameter.
Having a single field
to search is certainly more efficient, at the expense of a larger
index. As always
"it depends" on the nature of your index, the response speed you
require etc. etc.
The advantage of just putting a bunch of fields in the "qf" parameter
is that you can
weight each one individually. Whether it's worth it or not in your situation is
"an exercise for the reader" ;)


bq: Cool, like "if I spell it exactly right, I want that result to float
to the top"?

Exactly. It's a tradeoff though. My name is a perfect example. If
someone searches
for "erik eriksson" _I_ want to be listed at the top ;)

bq: Since I'm taking the query from the user in my backend Java to convert
it into a Solr call, I'm comfortable doing everything in the Java code
itself.

Again, another tradeoff, completely up to you. Mostly I've found it
depends on which is
administratively easier in your particular environment.

1> pushing the configs to ZooKeeper (bin/solr zk upconfig......)
2> reloading the collection (Collections API call)

.vs.

1> insuring my new jar gets to all the places it should be, which may
be only a single spot.
2> restarting (perhaps) the back-end.

Best,
Erick

On Mon, Mar 12, 2018 at 3:32 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Erick,
>
> (Sorry... hit sent inadvertently before completion...)
>
> On 3/12/18 2:50 PM, Erick Erickson wrote:
>> Something like:
>>
>> ....solr/collection/query?q=chris shultz&defType=edismax&qf=all^10
>> phonetic
>
> Interesting. Looks like the "qf=all phonetic" would take the place of
> my existing "df=all" parameter.
>
>> The point of edismax is to take whatever the input is and
>> distribute it among one or more fields defined by the "qf"
>> parameter.
>
> That's an entirely lucid explanation. That's not evident from reading
> the official documentation :)
>
>> In this case, it'll look for "chris" and "shultz" in both the
>> "all" and "phonetic" fields. It would boost matches in the "all"
>> field by 10, giving you an easy knob to tweak for "this field is
>> more important than this other one".
>
> Cool, like "if I spell it exactly right, I want that result to float
> to the top"?
>
>> You can combine  "fielded" searches, something like:
>> ....solr/collection/query?q=firstName:chris
>> shultz&defType=edismax&qf=all phonetic
>>
>> would search for "shultz" in the "all" and "phonetic" fields while
>> searching for "chris" only in the "firstName" field.
>
> Perfect.
>
>> As you have noticed, there are a _lot_ of knobs to tweak when it
>> comes to edismax, and the result of adding &debug=query to the URL
>> can be...bewildering. But edismax was created exactly to spread the
>> input out across multiple fields automatically.
>>
>> You can also put these as defaults in your requesthandler in
>> solrconfig.xml. The "browse" handler in some of the examples will
>> give you a template, I'd copy/paste from the "browse" handler to
>> you main handler (usually "selsect"), as the "browse" handler is
>> tied into the Velocity templating engine....
>
> Since I'm taking the query from the user in my backend Java to convert
> it into a Solr call, I'm comfortable doing everything in the Java code
> itself. I'd actually rather not have too much automated stuff, because
> then I think I'll confuse myself when using the Solr dashboard for
> debugging, etc.
>
>> To start, since there are a lot of parameters to tweak, I'd just
>> start with the "qf" field (plus some boosts perhaps). Then move on
>> to pf, pf2, pf3. mm will take a while to get your head around all
>> by itself. I think once you see the basic operation, then the rest
>> of the parameters will be easier to understand.
>>
>> And I urge you to take it a little at a time, just use two fields
>> and two terms and look at the result of &debug=query, the parsed
>> query bits, 'cause each new thing you add adds a further
>> complication. Fortunately you can just put different parameters on
>> the URL and see the results for rapidly iterating.
>
> Exactly :)
>
> Thanks for the hints,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqm//AdHGNocmlzQGNo
> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFhn2Q/+KgmjtAbKbak3qSB9
> eHqNz58HS1TQ5XAosMw5WvWikqPcSH+rWVyOQfk+UPNNnI/lsK9dt1Tqpg3LPSHd
> cdJFEweoWQWhqWkj5lYj+/cJHcuS2Bd4TP3wOuAIdm7heP3iHVsjfRS7YodRVGCn
> JRbmiJBmtSlw1K+leMf4IF4kkBCzDEuZU/LcKfzyU3VoNORwtGYGHq9EXxaDtFyh
> 0v8v8PJWGHXgAKxdCf9a1qK9Jb40mTciGIhEQ1V083sN4U/Dieq+u9/VCVTzqlwC
> KuZ9YWSA58Pqx3biJYwNrjJJITFRFZT4C/TNKeiDENe53n3fL+HsSAhxs2RDvLO0
> qK3NXN75B32gLZi7n/+s0SCqQcJeV/HlomLjHeB+0bUTi9Mwwqng7qoaJ49FIdjq
> N4lgjVLJMZmp87m883PlLev0ZXrTuoX/QRj4a5xh7tENfQ3StoUz0cC0D8GDO+XO
> WERL5p98KZtfca95SHAQSK41H74O5AbfG/h85iZitRQaM4mYt/cs5DAdGif9T4+z
> ZDzKgk1kutsTKDRyFZM6qK1O/K+9mk8ye6op+RGCYRr5qbJZpgwgUO8Vl+kOgLS7
> WljUkmLbOGsGo8a2pJNJ481OhD3e+C5pa+SFGaxtYT7GBiuGJ/y8LA4HqtXzd+k3
> wiHOJ0Bixyo1T4aEjbGZ+tFTOTM=
> =ehg4
> -----END PGP SIGNATURE-----

Re: Including a filtered-field in the default-field

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Erick,

(Sorry... hit sent inadvertently before completion...)

On 3/12/18 2:50 PM, Erick Erickson wrote:
> Something like:
> 
> ....solr/collection/query?q=chris shultz&defType=edismax&qf=all^10
> phonetic

Interesting. Looks like the "qf=all phonetic" would take the place of
my existing "df=all" parameter.

> The point of edismax is to take whatever the input is and
> distribute it among one or more fields defined by the "qf"
> parameter.

That's an entirely lucid explanation. That's not evident from reading
the official documentation :)

> In this case, it'll look for "chris" and "shultz" in both the
> "all" and "phonetic" fields. It would boost matches in the "all"
> field by 10, giving you an easy knob to tweak for "this field is
> more important than this other one".

Cool, like "if I spell it exactly right, I want that result to float
to the top"?

> You can combine  "fielded" searches, something like: 
> ....solr/collection/query?q=firstName:chris 
> shultz&defType=edismax&qf=all phonetic
> 
> would search for "shultz" in the "all" and "phonetic" fields while 
> searching for "chris" only in the "firstName" field.

Perfect.

> As you have noticed, there are a _lot_ of knobs to tweak when it
> comes to edismax, and the result of adding &debug=query to the URL
> can be...bewildering. But edismax was created exactly to spread the
> input out across multiple fields automatically.
> 
> You can also put these as defaults in your requesthandler in 
> solrconfig.xml. The "browse" handler in some of the examples will
> give you a template, I'd copy/paste from the "browse" handler to
> you main handler (usually "selsect"), as the "browse" handler is
> tied into the Velocity templating engine....

Since I'm taking the query from the user in my backend Java to convert
it into a Solr call, I'm comfortable doing everything in the Java code
itself. I'd actually rather not have too much automated stuff, because
then I think I'll confuse myself when using the Solr dashboard for
debugging, etc.

> To start, since there are a lot of parameters to tweak, I'd just
> start with the "qf" field (plus some boosts perhaps). Then move on
> to pf, pf2, pf3. mm will take a while to get your head around all
> by itself. I think once you see the basic operation, then the rest
> of the parameters will be easier to understand.
> 
> And I urge you to take it a little at a time, just use two fields
> and two terms and look at the result of &debug=query, the parsed
> query bits, 'cause each new thing you add adds a further
> complication. Fortunately you can just put different parameters on
> the URL and see the results for rapidly iterating.

Exactly :)

Thanks for the hints,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqm//AdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFhn2Q/+KgmjtAbKbak3qSB9
eHqNz58HS1TQ5XAosMw5WvWikqPcSH+rWVyOQfk+UPNNnI/lsK9dt1Tqpg3LPSHd
cdJFEweoWQWhqWkj5lYj+/cJHcuS2Bd4TP3wOuAIdm7heP3iHVsjfRS7YodRVGCn
JRbmiJBmtSlw1K+leMf4IF4kkBCzDEuZU/LcKfzyU3VoNORwtGYGHq9EXxaDtFyh
0v8v8PJWGHXgAKxdCf9a1qK9Jb40mTciGIhEQ1V083sN4U/Dieq+u9/VCVTzqlwC
KuZ9YWSA58Pqx3biJYwNrjJJITFRFZT4C/TNKeiDENe53n3fL+HsSAhxs2RDvLO0
qK3NXN75B32gLZi7n/+s0SCqQcJeV/HlomLjHeB+0bUTi9Mwwqng7qoaJ49FIdjq
N4lgjVLJMZmp87m883PlLev0ZXrTuoX/QRj4a5xh7tENfQ3StoUz0cC0D8GDO+XO
WERL5p98KZtfca95SHAQSK41H74O5AbfG/h85iZitRQaM4mYt/cs5DAdGif9T4+z
ZDzKgk1kutsTKDRyFZM6qK1O/K+9mk8ye6op+RGCYRr5qbJZpgwgUO8Vl+kOgLS7
WljUkmLbOGsGo8a2pJNJ481OhD3e+C5pa+SFGaxtYT7GBiuGJ/y8LA4HqtXzd+k3
wiHOJ0Bixyo1T4aEjbGZ+tFTOTM=
=ehg4
-----END PGP SIGNATURE-----

Re: Including a filtered-field in the default-field

Posted by Erick Erickson <er...@gmail.com>.
Something like:

....solr/collection/query?q=chris shultz&defType=edismax&qf=all^10 phonetic

The point of edismax is to take whatever the input is and distribute
it among one or more fields defined by the "qf" parameter.
In this case, it'll look for "chris" and "shultz" in both the "all"
and "phonetic" fields. It would boost matches in the "all" field by
10,
giving you an easy knob to tweak for "this field is more important
than this other one".

You can combine  "fielded" searches, something like:
....solr/collection/query?q=firstName:chris
shultz&defType=edismax&qf=all phonetic

would search for "shultz" in the "all" and "phonetic" fields while
searching for "chris" only in the "firstName" field.

As you have noticed, there are a _lot_ of knobs to tweak when it comes
to edismax, and the result of adding &debug=query to the URL can
be...bewildering. But edismax was created exactly to spread the input
out across multiple fields automatically.

You can also put these as defaults in your requesthandler in
solrconfig.xml. The "browse" handler in some of the examples will give
you a template, I'd copy/paste from the "browse" handler to you main
handler (usually "selsect"), as the "browse" handler is tied into the
Velocity templating engine....

To start, since there are a lot of parameters to tweak, I'd just start
with the "qf" field (plus some boosts perhaps). Then move on to pf,
pf2, pf3. mm will take a while to get your head around all by itself.
I think once you see the basic operation, then the rest of the
parameters will be easier to understand.

And I urge you to take it a little at a time, just use two fields and
two terms and look at the result of &debug=query, the parsed query
bits, 'cause each new thing you add adds a further complication.
Fortunately you can just put different parameters on the URL and see
the results for rapidly iterating.

Best,
Erick


On Mon, Mar 12, 2018 at 11:30 AM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Erick,
>
> On 3/12/18 1:36 PM, Erick Erickson wrote:
>> Did you try edismax?
>
> Err.... no, and I must admit that it's a lot to take in. Did you have
> a particular suggestion for how to use it?
>
> Thanks,
> - -chris
>
>> On Mon, Mar 12, 2018 at 10:20 AM, Christopher Schultz
>> <ch...@christopherschultz.net> wrote: All,
>>
>> I have a Solr index containing application user information
>> (username, first/last, etc.). I have created an "all" field for the
>> purpose of using it as a default. It contains most but not all
>> fields.
>>
>> I recently added phonetic searching for the first and last names
>> (together in a single field) but it will only work if the query
>> specifies that field like this:
>>
>> chris or phonetic:schultz
>>
>> Is there a way to add the phonetic field to the "all" field and
>> have it searched phonetically alongside the non-phonetic
>> fields/terms? I see I cannot have multiple "default fields" :)
>>
>> I know on the back-end I can construct a query like this:
>>
>> all:[query] phonetic:[query]
>>
>> ...but I'd prefer to do as little massaging of the query as
>> possible.
>>
>> Thanks, -chris
>>
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqmxzEdHGNocmlzQGNo
> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFiejxAAwYVKaztnIESfGTik
> W2AVf1b/gOKp4WKzOK4Jg37Qjmguzfm2yPuD38gauP62ph5JPKeWjIAU4JHi/O8Y
> U5tWO2AuJBC/l7+t++vDTITP1iwFS1c7iXCpaMpZ16Ji3ScuKW5ZV2vMIioLXw6U
> 9BH5xtgh63D2JUyse89LzNVQULBENZx2uzAz7+q7ne7LYdWSR8949ry0EUOssVX+
> HEV1Be2QmmLUVHg1bSsTt678mrqV8EGm8Z1pf7WOBK6OJKA36iRTSxlyboShMP5D
> 5OnIfUoL+HxwIOnjevAmZU4zDZVllXdBme66xF/WT8+HP3NEWqBMDzcRlO8M1TPe
> yY9Y0By9cpkIXasm2uVYZzmUy5Hb+CcQOUXKLrvxqkE018+iey49pivr7ne2+W+B
> m0XF7qha4zPBT3onZNm2iDqNuMbVv1443aaAMNjh/E6RwsEgJ6PKSZjMKxM6QEdj
> 5Jy6dUGqhkQHgFfEa6srz1XHSbL5vwPyH3WQNv1pIRuvASbdfEinZPNmiPM36iMi
> itlO9HulZ80/It7aQR9llqt10bEK0vh7CzN7EzI6Yu+st1g/uVHeg8GMupNYd0u0
> /1t0NQafKjaf1UTO5ubLN/QiDSA1NYVNHkAczbnNzdHj0Z7sI5l2fkNWWxFzikQi
> RuYSZRH+EG4C2ey1f8vkxlrwIwE=
> =lb3e
> -----END PGP SIGNATURE-----

Re: Including a filtered-field in the default-field

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Erick,

On 3/12/18 1:36 PM, Erick Erickson wrote:
> Did you try edismax?

Err.... no, and I must admit that it's a lot to take in. Did you have
a particular suggestion for how to use it?

Thanks,
- -chris

> On Mon, Mar 12, 2018 at 10:20 AM, Christopher Schultz 
> <ch...@christopherschultz.net> wrote: All,
> 
> I have a Solr index containing application user information
> (username, first/last, etc.). I have created an "all" field for the
> purpose of using it as a default. It contains most but not all
> fields.
> 
> I recently added phonetic searching for the first and last names 
> (together in a single field) but it will only work if the query 
> specifies that field like this:
> 
> chris or phonetic:schultz
> 
> Is there a way to add the phonetic field to the "all" field and
> have it searched phonetically alongside the non-phonetic
> fields/terms? I see I cannot have multiple "default fields" :)
> 
> I know on the back-end I can construct a query like this:
> 
> all:[query] phonetic:[query]
> 
> ...but I'd prefer to do as little massaging of the query as
> possible.
> 
> Thanks, -chris
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqmxzEdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFiejxAAwYVKaztnIESfGTik
W2AVf1b/gOKp4WKzOK4Jg37Qjmguzfm2yPuD38gauP62ph5JPKeWjIAU4JHi/O8Y
U5tWO2AuJBC/l7+t++vDTITP1iwFS1c7iXCpaMpZ16Ji3ScuKW5ZV2vMIioLXw6U
9BH5xtgh63D2JUyse89LzNVQULBENZx2uzAz7+q7ne7LYdWSR8949ry0EUOssVX+
HEV1Be2QmmLUVHg1bSsTt678mrqV8EGm8Z1pf7WOBK6OJKA36iRTSxlyboShMP5D
5OnIfUoL+HxwIOnjevAmZU4zDZVllXdBme66xF/WT8+HP3NEWqBMDzcRlO8M1TPe
yY9Y0By9cpkIXasm2uVYZzmUy5Hb+CcQOUXKLrvxqkE018+iey49pivr7ne2+W+B
m0XF7qha4zPBT3onZNm2iDqNuMbVv1443aaAMNjh/E6RwsEgJ6PKSZjMKxM6QEdj
5Jy6dUGqhkQHgFfEa6srz1XHSbL5vwPyH3WQNv1pIRuvASbdfEinZPNmiPM36iMi
itlO9HulZ80/It7aQR9llqt10bEK0vh7CzN7EzI6Yu+st1g/uVHeg8GMupNYd0u0
/1t0NQafKjaf1UTO5ubLN/QiDSA1NYVNHkAczbnNzdHj0Z7sI5l2fkNWWxFzikQi
RuYSZRH+EG4C2ey1f8vkxlrwIwE=
=lb3e
-----END PGP SIGNATURE-----

Re: Including a filtered-field in the default-field

Posted by Erick Erickson <er...@gmail.com>.
Did you try edismax?

On Mon, Mar 12, 2018 at 10:20 AM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> All,
>
> I have a Solr index containing application user information (username,
> first/last, etc.). I have created an "all" field for the purpose of
> using it as a default. It contains most but not all fields.
>
> I recently added phonetic searching for the first and last names
> (together in a single field) but it will only work if the query
> specifies that field like this:
>
>   chris or phonetic:schultz
>
> Is there a way to add the phonetic field to the "all" field and have
> it searched phonetically alongside the non-phonetic fields/terms? I
> see I cannot have multiple "default fields" :)
>
> I know on the back-end I can construct a query like this:
>
>   all:[query] phonetic:[query]
>
> ...but I'd prefer to do as little massaging of the query as possible.
>
> Thanks,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqmtt8dHGNocmlzQGNo
> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFggzQ//SRglgqRRvh9GgwCk
> A2xAjiMZSnf6iYsVJDMPlP1IhlLVrgPH5gm3tKWbOHdf52s3RPaWXHlDE3PAuHtx
> gpDPOief+mo4X/XmlWnj8R461XahOAhEDKeJ6uIS4X2qR2hZvSQd+gXMN4/aoA/l
> BcRNSTiQGKUVDDj+3wZayFhjElrrfaDbWC2dwnM2ULMrgK7xyhnulCVjUV+hOswY
> AmMyTuDJNjPuiT867x8Cckoh8J468OkBtQUUkdHn9UiHwShD8TxaDSUVcpqyxihr
> oODmvLfPN6EIkv0CN4h/pNrRCvQBlNTSeIh2AqFk7rnD4W0nWSzRXcV5seyGushI
> pzPvebtIsYcxx+DU7d/4jqH42yba9fADPFa+xhHckbwY4e2lZxvKF7HpLu6aoVnH
> zhCl/Cdu3cwZPmDWsUX+3Xkb7r28pe1iUrdNoYrbrhfL2WR6xJX5hL32QQyoyy8V
> w/SU8XLgETYSe0oN773F/Lxjwf2AVATdKY9acrsKr+KSI5VFEFBHNJctkpk0o630
> OOI1FYencsbiCdIVoRQ5b94EU/iAqs7r8wi6OdyeawyPOFDZhFwFMeYUPasuWrCP
> MEB0iSbCI9OIG5pi6tiTtbOQQ85Qb41u2VcyOqKHkneEMn58/nx2QY0FiS3XvcC7
> HuZC0A7VssLRu2g5+joWp4NBILI=
> =yyJm
> -----END PGP SIGNATURE-----